DMD 0.170 release
Oskar Linde
oskar.lindeREM at OVEgmail.com
Tue Oct 17 12:32:47 PDT 2006
Tom S wrote:
[snip proposal]
I'd definitely vote for this. It would be a new evolutionary step for D.
The suggestion is an extremely powerful and generic construct that
generalizes not only the foreach iterator constructs, but many others
aswell. Just some quick thoughts:
You could reimplement the while-loop:
void _while(lazy bool condition, void delegate() dg, inout void* ret) {...}
The infinite loop could finally be expressed without cludges:
forever {...}
You could make your own threading construct:
asynchronously { s.connect(); s.send(something); s.close(); }
Or why not:
foreach_parallel (objects) (Object o) {
o.doSomething();
}
A custom synchronization construct:
mySynchronized("namedLock") {
...
}
The possibilities seem endless. It is almost scary. And best of all: It
doesn't contain a single template. :)
/Oskar
More information about the Digitalmars-d-announce
mailing list