DIP 1019--Named Arguments Lite--Community Review Round 2

FeepingCreature feepingcreature at gmail.com
Fri Jun 7 05:18:51 UTC 2019


On Friday, 7 June 2019 at 03:52:24 UTC, Jonathan Marler wrote:
> By my estimate the percentage of functions that fit any of 
> these 3 criteria is around 15%. This isn't backed by any real 
> data, just an estimate.  I would love to see actual data on 
> this, if someone wants to go through some druntime/phobos 
> modules and count how many functions would benefit from named 
> arguments.  And my criteria list could also be incomplete, I'm 
> sure there are other cases where named parameters could be 
> useful.  Please let me know if you can think of any more.  And 
> if it turns out the percentage is much higher than my estimate, 
> then I might change my mind and say that decreasing 
> encapsulation is worth the benefit of having named parameters 
> "always on".

D has features that are useful for a *lot* less than 15% of 
cases. If you think named parameters are so harmful that 15% is 
too low a rate to bring them in, then you basically dislike named 
parameters as a feature. But this is not a disagreement on merits 
- the things you dislike *are* the things that I like about named 
parameters. I think we have to separate "I don't like these parts 
of this feature" and "I think these parts don't *work*".

The very notion of "Named Arguments Lite" is in my opinion the 
consequence of trying to appeal to people who just don't find 
named arguments appealing.

I think we need to separate "problems with named arguments" and 
"problems with this DIP for named arguments" (of which there's 
still plenty). If you think that named arguments, or rather 
opt-out named arguments, are a bad idea, there should be a 
separate language design thread to debate that question.


More information about the Digitalmars-d mailing list