|
|
|
|
|
by masklinn
3842 days ago
|
|
> I can see the alternate viewpoint but given that we can use structs and default fields to get the same effect I'm happy with the current solution. And that's completely fair, I routinely use languages both with and without optional parameters[0] and that's fine I'm not saying languages must[1] have optional parameters, or even that they should[1]. My comment only tries to humorously denote that the claim I quoted is pure lunacy. > we can use structs and default fields Don't forget the builder pattern which works pretty well to replace optional parameters (and keyword/named parameters), though it's less convenient on the implementer's side. [0] whether in the "native" sense à la Python or C#, in the "overloaded method" sense à la C++ or Java or in the "well your question doesn't even make sense" à la Smalltalk [1] in an RFC 2119 sense |
|