top | item 44945686

(no title)

michaelfeathers | 6 months ago

This is called point-free style in Haskell.

Sometimes it is called a fluent-interface in other languages.

discuss

order

bear8642|6 months ago

> Sometimes it is called a fluent-interface in other languages.

Where've you heard it called that? I've normally heard tacit programming

michaelfeathers|6 months ago

The developers of JMock, the original library for Java.

lock1|6 months ago

Or "point-less" style ;)

Could you elaborate? AFAIK tacit programming tend to be scrambling around composition, paren, and args which makes left-to-right reading significantly harder for function with arity greater than 2.

I find Java's method reference or Rust's namespace resolution + function as an argument much better than Haskell tacit-style for left-to-right reading.

mrkeen|6 months ago

It's chaining functions with a dot, just like you do in typical OO languages.

When it's OO, it's a virtue that everyone loves - a "fluent interface".

When it's FP - oh it's unreadable! Why don't they just break every line out with an intermediate variable so I know what's going on!