Will D ever get optional named parameters?

"岩倉 澪" via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 15 09:46:13 PDT 2014


On Wednesday, 15 October 2014 at 11:52:13 UTC, bearophile wrote:
> ketmar:
>
>> besides, nested foreach with '_' is not working. but "__"
>> can generate unique temporary variable each time.
>
> The point is to introduce a little breaking change in D and use 
> "_" as "don't care", so you can reuse it for nested scoped and 
> for tuple unpacking, and for other similar future purposes.
>
> Bye,
> bearophile

I agree that _ would be the ideal syntax, but why make a breaking 
change when it is unnecessary? __ would serve just as well and it 
is only one extra character. It is already reserved so it would 
be reasonable to put it to good use.


More information about the Digitalmars-d mailing list