Concurrency support?

Brendan Eich brendan at mozilla.org
Sun Jun 25 17:10:02 PDT 2006


On Jun 25, 2006, at 6:30 PM, Neil Mix wrote:

> 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




More information about the Es4-discuss mailing list