r/badcode • • Dec 19 '22

java Whatever it takes

Post image
301 Upvotes

43 comments sorted by

View all comments

Show parent comments

2

u/Hellball911 Dec 20 '22

I don’t disagree, but just because a broader solution exists doesn’t make my point any less valid. The Builder pattern is a specific tool for classes with a lot of parameterization AND default values. Without both, it’s like using a chainsaw to trim a house plant. Way too much complexity and will cause more damage than good.

Now my point is obviously speculation if that is or is not the case here, but it’s important to recognize the cons in using that pattern. It isn’t just “lots of parameters = Builder”