3 ms·
No, I think it is the same thing. Typically¹ with a Builder there's one final method that builds and returns the final object (which has a different type). ¹ E
by iainmerrick 3y ago
No, I think it is the same thing. Typically¹ with a Builder there's one final method that builds and returns the final object (which has a different type).
¹ Edit to add: well, it's a pattern I've seen a lot, anyway. I think it's preferable to mutating the final object in place because it "makes illegal states unrepresentable" as others in this discussion have mentioned.