DIP 1019--Named Arguments Lite--Final Review
matheus
matheus at gmail.com
Mon Aug 26 15:00:44 UTC 2019
On Saturday, 24 August 2019 at 01:09:48 UTC, Jonathan M Davis
wrote:
> Personally, I'm against named arguments in general. They make
> the parameter names part of the API, which adds another set of
> names that you have to get right up front and which will be
> bike-shedded to death. The _only_ use case IMHO where they add
> any real value is when you have a long parameter list where
> most of the parameters having default arguments. Such functions
> are usually a bad design, so I'm fine with not having named
> arguments in the language to make such designs seem more
> reasonable. If your parameter list is long enough that it
> doesn't work to go by the order of the arguments, then you
> already have a problem. But if we're going to add named
> arguments, then IMHO, the rare case where it actually makes
> sense to have a lot of parameters with default arguments is
> what named arguments are there to solve. So, if the DIP can't
> solve that, then IMHO, it's just making the language worse to
> no benefit.
+1.
Matheus.
More information about the Digitalmars-d
mailing list