News for hackers. Stuff that matters.
Re:jQuery 4.1.0 by anamexis on Tuesday November 17, 2026 @05:14PM (#50538998)
Fluent interface is method chaining, and it's already obviously in JS. The proposed pipeline operator is neither method chaining nor fluent interface.
Re:jQuery 4.1.0 by abanana on Tuesday November 17, 2026 @05:37PM (#50539273)
As I understand it, it's a different method to create something that matches the whole idea of a fluent interface, without having to build every method to support chaining, isn't it? And in a way that works for all language features rather than just your custom methods?

Maybe not precisely the same from a technical point of view but is it just pendantry to argue against someone referring to it as a fluent interface? Happy to learn and to be corrected if required.

Re:jQuery 4.1.0 by anamexis on Tuesday November 17, 2026 @06:20PM (#50539630)
What is the "whole idea" of a fluent interface if not specifically method chaining?
Re:jQuery 4.1.0 by abanana on Wednesday November 18, 2026 @05:36AM (#50544518)
paulddraper has phrased it perfectly in answer to your previous post - chaining everything so that the process flow reads fluently from left to right. (I'm replying just to avoid leaving your question hanging.)

To suggest the pipeline proposal must not be referred to as a "fluent interface" would seem to me to be arguing semantics, ignoring the point behind the words, or the facts that they can have implied meanings or subtle changes over time.

Re:jQuery 4.1.0 by anamexis on Wednesday November 18, 2026 @09:12AM (#50546542)
I think the point behind the words is that it is a specific design pattern based on building DSLs using method chaining. I don't think pipelines, broadly, are an implementation of that design pattern. It's a way to string together function calls in a way that they read left-to-right, yes, but the spirit of "fluent interface" is not just "reads left-to-right." It's a specific pattern.
Re:jQuery 4.1.0 by everforward on Tuesday November 17, 2026 @08:26PM (#50540702)
It can, but the typical usage I’m used to is far less structured and need not involve the value having the same type at every point. Eg something like

|> docker.listContainers() filter(x => x.name == “something”) first getNetwork getIpAddress toString ping

(ignore that some of these should be chained and some should be arguments, I haven’t read the proposal fully)

They’re doubly nice in Clojure because of the lazy evaluation. You can map a pipeline over a list and it will evaluate one at a time rather than pre-evaluating and allocating memory for the whole thing.

Re:jQuery 4.1.0 by paulddraper on Tuesday November 17, 2026 @11:34PM (#50541917)
The pipeline operator makes it possible to chain any functions.

Which true is not per se fluent interfaces, but it reads similarly. And "fluent" as the name suggests, has a lot to do with how it reads.