On Sunday, 25 August 2013 at 21:17:43 UTC, Andrei Alexandrescu wrote:
On 8/25/13 12:46 PM, Joseph Rushton Wakeling wrote:
On 25/08/13 21:10, monarch_dodra wrote:
It never clashes untill you nest two foreach, and then you have to use
__ ...

foreach( _ ; 0 .. M)
    foreach( __ ; 0 .. N)
        ...

I have an enhancement request to simply allow anonymous iteration:
foreach( ; 0 .. N)

http://d.puremagic.com/issues/show_bug.cgi?id=9009

Good call. :-)

I don't see why the excitement around anonymous bindings. It's a rare case and it's not like we're running out of symbols, particularly given they're by definition written only once :o).

Andrei

I think "the excitement" is an overstatement. The subject comes up every now and then. The "foreach(_)" semantic is getting a bit more common, but it tends to confuse newbies, that ask about it. At that point, I simply point out that there is this ER, and people tend to agree it would be a nice addition.

I agree it's not like its a real problem or anything, but it would be nice to have. Is all.

Reply via email to