DIP 1030--Named Arguments--Community Review Round 1 Discussion

Manu turkeyman at gmail.com
Mon Feb 10 20:50:40 UTC 2020


On Mon, Feb 10, 2020 at 12:25 PM IGotD- via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> On Monday, 10 February 2020 at 19:38:34 UTC, Manu wrote:
> >
> > I don't have any horse in this race... but I do just want to
> > echo that
> > I don't understand this feature at all.
> > I don't know what it's for. I've never felt I wanted named
> > arguments
>
> It's about my thoughts too. I think the question that needs to be
> solved by named parameters isn't strong enough.
>
> Optional named parameters are handy but D already offers a
> variety of methods in order to pass those.
>
> My fear as already other people pointed out is that named
> arguments will give D split personality. Some people adore named
> arguments and will use them for everything and others will not
> touch them. Libraries will use either methods and therefore make
> D feel schizophrenic.
>
> Also what would the implementation complexity be if this would be
> implemented?

I doubt there's any meaningful implementation complexity inside DMD.

I showed examples of how this split personality will affect authors of
meta libraries.
Not being able to easily produce call shims or wrappers is a huge loss
without some sort of solution analogous to existing reflection tools.
I also think 'renaming a parameter (to improve API clarity) ==
breaking API change' is a frustrating world to live in.


More information about the Digitalmars-d mailing list