Subject: Re: Harmony - proxies | asynchronous
brendan at mozilla.com
Fri Sep 2 16:39:53 PDT 2011
On Sep 2, 2011, at 4:15 PM, John J Barton wrote:
> Ok I hope someone creates more tutorial information about generators. I read about them and played around with some examples, but I did not come away thinking positive.
You might start with Dave Herman's async library, task.js:
> Thanks, that's much clearer. So proxies are a generalization of getters.
See also http://brendaneich.com/2010/11/proxy-inception/ (thanks to Tom and Mark for much of the pretty slideware).
> As for the application, reasoning about code that looks like hash-table lookup but acts very different may not be better than reasoning about code that looks like spaghetti but acts like you expect.
The two are not easy to trade off. Spaghetti is the bigger problem, IMHO, since you can make proxies behave well (unlike host objects, e.g. DOM nodelists, which can be implemented with proxies [with a few edge-case extensions] but which act like "live cursors").
API design taste is still required to avoid making gratuitously magical objects. Promises are a non-magical use-case, IMHO.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss