Concurrency support?

Nicolas Cannasse ncannasse at motion-twin.com
Sun Jun 25 23:55:30 PDT 2006


>>FWIW, concurrency support (or more specifically, the ability to  
>>yield while waiting for an event) is easily the top item in my list  
>>of enhancement requests for the JavaScript language.  I've been  
>>building large-ish client-side "AJAX" applications for several  
>>years now, and I find it painfully difficult to debug asynchronous  
>>callbacks and read asynchronous code.  My wife, in particular,  
>>would like to see concurrency in JavaScript so that she might have  
>>normal conversations with me the end of my workday.
> 
> 
> See http://developer.mozilla.org/es4/proposals/ 
> iterators_and_generators.html, apologies for the gaps there.  They  
> will be filled in shortly.
> 
> The idea in emulating Python 2.5 generators is that you can coroutine  
> your code -- you can use a standard Ajax library to map a single  
> function that contains yield expressions across a series of  
> asynchronous callbacks, without having to break that function up into  
> a bunch of callback functions.
> 
> /be

What about full continuations support à la call/cc ? Generators are just
a specific application of continuations, which are much more powerful
when freely usable.

Nicolas




More information about the Es4-discuss mailing list