Why is there no named parameter support?

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 9 02:00:01 PDT 2015


On Mon, 08 Jun 2015 20:32:56 -0700, Jonathan M Davis via
Digitalmars-d-learn wrote:

> is, but personally, I think that named arguments are a terrible idea in
> general, so I'm not about to try and support a position that tries to
> bring them into D.

it's a perfect thing. i always hate that "Flag" thingy, and with named 
arguments i finally got rid of it.

  void foo (bool skipSomething);

  foo(skipSomething:true);

no more additional imports and additional types for the simple things.

besides, i like `createWindow(x:10, y:10, width:20, height:40)` more than 
`createWindow(10, 10, 20, 40)`. sure, one can do all kind of acrobatics 
to emulate that, but why? ah, another thing that Walter never used so he 
doesn't see it as a good thing to have.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150609/2f5571eb/attachment.sig>


More information about the Digitalmars-d-learn mailing list