Named arguments

Jonathan M Davis newsgroup.d at jmdavisprog.com
Wed Oct 25 14:07:29 UTC 2017


On Wednesday, October 25, 2017 13:56:51 bauss via Digitalmars-d wrote:
> On Wednesday, 25 October 2017 at 06:48:26 UTC, Jonathan M Davis
>
> wrote:
> > On Wednesday, October 25, 2017 06:23:52 bauss via Digitalmars-d
> >
> > wrote:
> >> [...]
> >
> > The issue I'm talking about is that if we had named arguments,
> > and the names of the parameters in .di and .d files didn't
> > match, and named arguments were used, then changing whether the
> > .di file or .d file were used would break code. e.g.
> >
> > [...]
>
> If you change function definitions you should provide fall-backs
> IMO and then deprecate the old function definition. Of course
> that's a world full of rainbows and unicorns, where people
> actually care about such things.

Sure, but you don't have to provide fallbacks if you're just changing the
implementation, and right now, the parameter names are part of the
implementation, whereas with named arguments, they would be part of the API.

- Jonathan M Davis



More information about the Digitalmars-d mailing list