foreach_reverse is better than ever
torhu
no at spam.invalid
Mon Feb 15 15:04:37 PST 2010
On 14.02.2010 11:12, Jacob Carlborg wrote:
> On 2/14/10 09:14, Jonathan M Davis wrote:
>>
>> Though I must say that I find retro to be a bit funny. I would have expected
>> it to be reverse. It would be clearer, I think, but it's not like it's hard
>> to find out what retro does and remember it.
>>
>> - Jonathan M Davis
>
> It iterates backwards, all the way back to the 50s. I think "reverse" is
> a much better word.
foreach (thing; backwards(lotsOfThings))
{
}
'backwards' would be fine by me. But then I don't seem to iterate in
reverse a whole lot, so it doesn't bother me that it's twice a long as
'retro'. Is that really a problem?
More information about the Digitalmars-d
mailing list