Dataflow concurrency instead of generators

Jason Orendorff jason.orendorff at
Fri May 15 11:15:07 PDT 2009

On Thu, May 14, 2009 at 7:35 PM, David-Sarah Hopwood
<david-sarah at> wrote:
>> For instance, suppose that you have dataflow concurrency, as supported
>> by Oz and by recent dataflow extensions for Ruby, Python, and Scala:
>> <>
>> <>
>> <>
>> <>
>> Then the functionality of a generator can be implemented using a
>> process/thread that extends a list or queue constructed from
>> dataflow variables.

I think you are proposing a model in which threads cannot share
mutable state and cannot have side effects which other threads can

Even the simplest generator use cases can't be implemented using
threads and dataflow variables in that kind of model.  To take a silly

  function iter(arraylike) {
      for (var i = 0; i < arraylike.length; i++)
          yield arraylike[i];

  for (elt in iter(document.getElementsByTagName("A")))

DOM NodeLists are mutable and so are the nodes being yielded.

I like the idea of going after the concurrency problem now.  I like
the idea of doing one language feature instead of two (concurrency and
generators).  Do you have a solution in mind for this kind of problem?


More information about the es-discuss mailing list