3 ms·
So you hate all builder-object methods that return the builder for further building? Ok.
by quotemstr 8y ago
So you hate all builder-object methods that return the builder for further building? Ok.
- jakelazaroff 8y agoThis isn't the builder pattern, since these methods directly mutate the final result rather than a distinct builder object. Also, it's perfectly possible to have a non-mutatative builder that returns an entirely new builder instance with the given configuration at each step.
- ris 8y agoYes. For the reason stated and also because they imply an easy/cheap/straightforward way of taking a copy of one of those objects that actually doesn't work. Does the caller of your function expect you to take that object it passed to it as "configuration" and mutate it?