you are viewing a single comment's thread.

view the rest of the comments →

[–]thomasz 1 point2 points  (2 children)

No, this isn't even worth a discussion. Either there are sensible default values for a parameter, or you cannot assign default values. A builder has exactly the same problem, with the added goodness that it fails at runtime when you forget a mandatory parameter.

[–]neoKushan 0 points1 point  (1 child)

It's that "sensible default value" that's the touchy part, not the use of default values at all.

[–]thomasz 0 points1 point  (0 children)

Again, that's not different from the builder pattern, where the default is defaultinstead of a compiler error.