Robert Bradshaw wrote: > On Apr 20, 2009, at 10:43 PM, Stefan Behnel wrote: >> Closure support will actually open up a can of worms, >> but a friendly one, as it will lay out the path towards lambda >> support and nested functions/classes. Especially support for >> generators seems to be an extremely worthy goal, but in the current >> state of Cython, it just cannot be done. > > All of the above are syntactic sugar for special closures.
Sure, but I would say that closure support is more or less finished when nested functions work. The rest are additional steps to add more syntax features on top of that. For example, generator support needs code that supports continuing function execution. Lambda functions need a transform into nested functions. That's additional work, but nothing that's worth caring about right now. The only way to get this working is to set achievable partial goals that we (or others) can build on. Even nested classes are out of scope for the first milestone, IMHO. > This has been bugging me for a *long* time. I'll pull out and go > though the random scattered stuff I've done over the past year > (something else more urgent has always come up everytime I've set out > to do this) and put it up within the week. Great! > Should I make a closure branch on the site? You'd create it from cython-unstable, I assume. Given that the current development works reasonably well with two branches (pull-direction unstable<-devel), I doubt that a third "closures" branch (pull-direction closures<-unstable) would add any major additional overhead, while still allowing us to finish up and release 0.12 from cython-unstable when it's time. I think that's a good idea. Should we make (basic?) closure support an official 0.13 goal? Stefan _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
