3 ms·
Fluent 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
by jrockway 17y ago
Fluent 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.)