Extended Type Design.
Sean Kelly
sean at f4.ca
Fri Mar 16 19:58:00 PDT 2007
Bill Baxter wrote:
> Sean Kelly wrote:
>> Bill Baxter wrote:
>>>
>>> So you mean foreach(reverse) then? I do like that! You're right
>>> that it is quite D-like. Too bad you weren't around back when
>>> foreach_reverse was introduced? ;-)
>>
>> This actually came up in more general terms:
>>
>> http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.announce&artnum=5015
>>
>>
>> Perhaps I over-complicated it with the talk of parallelism, but the
>> idea was still there :-)
>
> You have it using foreach!(arg) syntax there. But it's not really a
> template. Maybe it could be, and if it were then that would be great
> syntax for it. But otherwise it's just unprecendented. A new special
> case.
The syntax isn't really important. I was mostly looking for a way to
avoid creating a new keyword while supporting multi-directional iteration.
Sean
More information about the Digitalmars-d
mailing list