Remove foreach_reverse (was Re: Remove complex and imaginary types?)
Matti Niemenmaa
see_signature at for.real.address
Fri Jan 11 03:55:25 PST 2008
bearophile wrote:
> naryl:
>> Why don't we remove or at least shorten foreach_reverse too?
>
> Removing: -1. It's actually useful (I'd like to see more iteration
> constructs, not less).
>
> Shortening: it's long, so maybe yes, if you/someons find(s) something better.
> Do you have some suggestions?
Ever since the language got the ability to use delegates as the foreach
aggregate, there has been no need for foreach_reverse. Ironically enough, that's
the same release foreach_reverse was added (0.170).
Arrays should just have a built-in .reverseview (or whatever) property which
returns a delegate for iterating over the array in reverse order.
And add .sortedview while you're at it.
--
E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi
More information about the Digitalmars-d
mailing list