Subject: Re: Harmony - proxies | asynchronous

Dmitry Soshnikov dmitry.soshnikov at
Tue Sep 6 00:12:34 PDT 2011

On 03.09.2011 3:39, Brendan Eich wrote:
> 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:

The code of a complete library is always too complicated IMO to "begin 
with". If you want some small examples with detailed comments and 
explanations, here they are:

Simple (cooperative) processes with the Scheduler --
Processes with supporting trampolining --

and as a bonus -- Primitive Actor-processes through the `setTimeout` and browser 
scheduling (not about `yield` and tasks, but near).


>> Thanks, that's much clearer. So proxies are a generalization of getters.
> See also (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.
> /be
> _______________________________________________
> es-discuss mailing list
> es-discuss at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list