jargon

Design patterns·Making things

every method returns the object again, so the calls chain into something that reads almost like a sentence.

Fluent interface

Also calledmethod chaining, fluent API

An API designed for chained calls, where each method returns a receiver so the next call can follow. It is what most builders look like, and it is also used well beyond construction — query builders, assertion libraries, configuration. The costs are real and usually unmentioned: chained calls are awkward to debug, hard to break across a conditional, and confusing when the interface mixes mutating and copying steps.

Commonly confused with