Will D ever get optional named parameters?
ponce via Digitalmars-d
digitalmars-d at puremagic.com
Mon Oct 13 09:08:07 PDT 2014
On Monday, 13 October 2014 at 08:29:42 UTC, 岩倉 澪 wrote:
> From what I've found, there was some work on this in the past
> (http://forum.dlang.org/thread/wokfqqbexazcguffwiif@forum.dlang.org?page=6#post-thclpgdlfxxhhfklwsoj:40forum.dlang.org),
> but a pull request was never made/I don't seem to find
> discussion about adding it as a feature anywhere.
>
> I think optional named parameters would be a nice addition,
> either to the core language, or something like the monadic
> solution from that old thread in phobos.
>
> Are there good reasons not to add something like this to the
> language, or is it simply a matter of doing the work? Has it
> been discussed much?
Work-around I see a lot in C++:
---------------
bool filled = true;
drawCircle(filled);
---------------
instead of:
---------------
drawCircle(true);
---------------
More information about the Digitalmars-d
mailing list