On Wed, 15 Oct 2014 11:21:43 +0000 via Digitalmars-d <[email protected]> wrote:
> On Tuesday, 14 October 2014 at 21:21:23 UTC, 岩倉 澪 wrote:
> > Something like:
> > void foo(int a = 42, int b = 0){}
> > foo(@default, 7); //rewritten to foo(42, 7);
>
> It is useful to have "_" mean "I don't care" when you have
> tuples. So you would then write:
>
> "foo( _ , 7 )" and " _,y = get_point()"
it better be "__" (two underscores). the rationale is simple: "__" is
clearly reserved for internal use, so it can has any meaning we need
without breaking any code. 'cause single underscore now can be used as
placeholder in `foreach (_; 0..42)`, *AND* still can be accessed as
normal var. besides, nested foreach with '_' is not working. but "__"
can generate unique temporary variable each time.
signature.asc
Description: PGP signature
