DIP 88: Simple form of named parameters
default0 via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jan 24 03:50:03 PST 2016
On Sunday, 24 January 2016 at 11:20:20 UTC, Gary Willoughby wrote:
> Please, no more new syntax!
> This can be done using templates and Flag is not an ugly hack!
Why no more new syntax? I agree that keeping the language simple
is a good idea, but new syntax isn't usually hard to learn,
especially if it hits the sweet spot between being different
enough to easily tell that it means something special/new and
being close enough to the rest of the syntax to not feel alien.
Also Flag seems like quite the waste of linespace. In addition to
the name of the parameter I lose 7 characters (Flag!""). Named
arguments would only use up 2 (: ) or 3 ( = ) characters.
Plus, being a library solution, at first it makes you wonder if
there is something special going on with Flag (cuz you know,
types usually have associated behaviour), instead of being purely
for documentation purposes.
Totally qualifies as a hack to me.
More information about the Digitalmars-d