Steve Yegge's rant on The Next Big Language
BCS
ao at pathlink.com
Tue Feb 13 15:12:05 PST 2007
Reply to Jarrett,
> I guess it doesn't really miss much functionality, though the way D
> handles iteration certainly makes it harder to do parallel iteration.
> I have *no* idea how Walter/Andrei plan to implement the
> "foreach(i;a)(j;b){}" syntax that Andrei has been talking about.
It might take this approch (interate over the intersect of to AA's)
int delegate(int delegate (inout U, SetT!(T, T)) dg) Intersect(T, U)(T[U]
first, T[U] sec)
returns this delegate
|{
| foreach(k, v1; first)
| {
| if(v2 = (k in sec))
| {
| if(ret = dg (k, Set(v1, *v2))
| return ret
| }
| }
|}
>
> Generators, on the other hand, are just plain cool. I think they can
> be done using something like StackThreads.
>
I'm missing somthing here: what is a generator?
More information about the Digitalmars-d-announce
mailing list