[Issue 13522] Let's use '_' underscore as official ignore value
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Sep 23 06:09:50 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13522
bearophile_hugs at eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bearophile_hugs at eml.cc
--- Comment #1 from bearophile_hugs at eml.cc ---
I've added my vote.
Once "_" means "ignored" (and it has become a name that can't be read), you can
allow code like this where "_" is used more than once:
foreach (_; 0 .. 5)
foreach (_; 0 .. 5) {}
foo((a, _, _) => a);
// some kind of tuple destructuring syntax:
@{a, b, _} = myTup;
Other potentially important usages of the "ignored" value are for pattern
matching "ignored" wild-card.
--
More information about the Digitalmars-d-bugs
mailing list