Why is there no named parameter support?

Timothee Cour via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jun 8 20:18:50 PDT 2015


nim has both overloading and named arguments (with reordering and defaults
allowed): http://nim-lang.org/docs/tut1.html#procedures-named-arguments
and it doesn't seem to cause issues.

Is there a document / thread that explains the argument against named
arguments in more details than 'do not play well together' ?



On Mon, Jun 8, 2015 at 10:45 PM, Jonathan M Davis via Digitalmars-d-learn <
digitalmars-d-learn at puremagic.com> wrote:

> On Monday, June 08, 2015 20:36:05 Yuxuan Shui via Digitalmars-d-learn
> wrote:
> > Is there any reasons/difficulties for not implementing named
> > parameters?
> >
> > There is clearly a need:
> >
> >
> http://forum.dlang.org/thread/wokfqqbexazcguffwiif@forum.dlang.org#post-pxndhoskpjxvnoacajaz:40forum.dlang.org
>
> Function overloading and named arguments do not play well together, and we
> have function overloading, so we're not going to have named arguments.
> Walter made that clear at dconf. Now, as Idan pointed out in his reply,
> work
> has been done implement them via a library solution for those that want to,
> so you might get something there, but not in the language itself.
>
> - Jonathan M Davis
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150608/7f8f6314/attachment.html>


More information about the Digitalmars-d-learn mailing list