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.

Reply via email to