Re:Cedric Buest responds to Next-gen Java Programming Style
by sophacles on Tuesday August 11, 2009 @12:54PM
(#755653)
Quoting the article: "Fluent interfaces
Now that's an interesting recommendation since it contradicts directly Stephan's suggestion of not using setters, because make no mistakes: fluent interfaces are setters in disguise. So, Stephan, which one is it? :-)"
Functions are just goto in desguise. switch/case is just an if/elif/else in diguise. Objects are just structs with some fancy function calling semantics. So which one will you use? Fluent interfaces may just be setters in disguise, but they add quite a bit of value.
Re:Cedric Buest responds to Next-gen Java Programming Style
by cakeface on Tuesday August 11, 2009 @02:54PM
(#755998)
Yes, when I read his critique of fluent interfaces I realized that he is just disagreeing with everything to be contrary. "fluent interfaces are setters in disguise. So, Stephan, which one is it?" - he is not actually critiquing the fluent interfaces, just nitpicking the inconsistency. Its usually a mistake to be overly concerned with consistency.
Yes you can come up with a case where every one of those guidelines are wrong, but I think that there are a lot of cases where they make sense.
Functions are just goto in desguise. switch/case is just an if/elif/else in diguise. Objects are just structs with some fancy function calling semantics. So which one will you use? Fluent interfaces may just be setters in disguise, but they add quite a bit of value.
Yes you can come up with a case where every one of those guidelines are wrong, but I think that there are a lot of cases where they make sense.
I was just observing that you can't argue against mutators and then encourage people to use fluent interfaces since they are basically the same thing.
Gosub, if one were to nitpick:)