logoalt Hacker News

paulddraper • today at 9:39 PM • 0 replies • view on HN

This is called a fluent interface. [1] C++ streams are perhaps the most common example of this pattern.

A TC39 Stage 2 proposal adds this into the language itself with the pipeline `|>` operator. [2]

[1] https://en.wikipedia.org/wiki/Fluent_interface

[2] https://github.com/tc39/proposal-pipeline-operator