DMD 0.170 release
Charles D Hixson
charleshixsn at earthlink.net
Tue Oct 17 16:48:22 PDT 2006
Walter Bright wrote:
> John Reimer wrote:
>> I have to agree with Sean and Ary. My own opinion: I don't really
>> understand why "foreach_reverse" was, once again, just tossed into
>> the language with (what seems to be) a minimum of discussion?
>
> There was quite a bit of discussion. The thread was a bit old, but that
> doesn't make it less relevant:
>
> http://www.digitalmars.com/d/archives/digitalmars/D/17320.html
>
>> Well, will you look at that. Isn't that irony? We got our rolls
>> reversed, I think. I used to be Walter that was hesitant to add
>> keywords to the language. Go figure! :D
>
> I was reluctant to do it for a long time for that reason. It's just that
> no better solution emerged.
To me "for each" had the implication of an unordered
traversal, with the undertone that *sometime* when
multi-processor machines became more prominent each iteration
might be done on a different processor.
I'm aware that this was never the real intent...but that's the
subtext that I got when I read the code. This is partially
out of a desire to allow multi-processor systems to be used
efficiently. (What did Intel say? 64 cores/chip in 10 years?)
Perhaps another syntax to denote this will show up. (Each
function or subroutine call, perhaps? But that doesn't imply
parallelism.)
Sorry, just a reaction.
More information about the Digitalmars-d-announce
mailing list