3 ms·
What's so great about "Fluent" interfaces? If a language supports named parameters, they're inappropriate, no? (Yes, I know Java doesn't have named parameters,
by bkudria 17y ago
What's so great about "Fluent" interfaces? If a language supports named parameters, they're inappropriate, no?
(Yes, I know Java doesn't have named parameters, although it and many other languages that don't have it have a work-around with assignment. this is a general question.)
- jrockway 17y agoFluent interfaces suck. Mutating objects is not acceptable, especially when you should pass the correct stuff to the constructor. But this is Java, and it is the only way to cleanly allow inheritable initargs. (Perl/Moose and CLOS get this very right. I only use setters in those languages in very, very rare occasions, and it is usually because I am hacking around something messy.)