Design principles for extending ES object abstractions
lukeh at microsoft.com
Mon Jul 11 22:38:52 PDT 2011
>>>>If so, it seems safe to consider generators as sugar for producing objects whose visible behavior could have been built independently. And interoperation appears to work cleanly in both directions using these objects.
>>You're talking about interoperation in the "old script calls new generator" sense. That's using generators from old script, *not* implementing them using imperative API *in old script*.
I'm actually interested in both directions of interoperation. For example, future-jQuery might want to expose objects that are iterable and can be consumed in generators when used in ES6 syntax, but without itself opting into ES6. It could presumably do so by implementing the required state machines by hand and exposing next/send/throw/close.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss