foreach, an analogy

Mike Parker aldacron71 at yahoo.com
Thu Oct 19 03:01:01 PDT 2006


Vladimir Kulev wrote:
> I just want to put my heartfelt cry here. Foreach_reverse is evil! I like D,
> but such a things just increase probability that it never will be not a
> toy. Implement an iterators integration into foreach, or do something else,
> but do in intensive way, not extensive!

I disagree. foreach_reverse is much more clear and concise than any 
solution using iterators. I don't get why so many people are griping 
about it. It's just sugar, much like foreach itself. If you don't like 
it, don't use it. You can implement iterators yourself, or use delegates 
with a plain foreach to get any sort of order traversal you like. Don't 
take away foreach_reverse from those of use who actually like it.

 > Walter, read some books about language architectures and design, please!
 > There are lots of info in the Internet.

Oh, that's a gem.



More information about the Digitalmars-d-announce mailing list