January 19 meeting notes

Jon Zeppieri zeppieri at gmail.com
Thu Jan 19 22:51:16 PST 2012


On Thu, Jan 19, 2012 at 11:02 PM, Brendan Eich <brendan at mozilla.org> wrote:
>
> Yes kids, this means we are going with MarkM's lambda desugaring from:
>
> https://mail.mozilla.org/pipermail/es-discuss/2008-October/007819.html

Is there a version of this desugaring that deals with recursive
bindings in the initializer expression of the loop?

In my post (https://mail.mozilla.org/pipermail/es-discuss/2008-October/007826.html),
I used an example like:

   for (let fn = function() { ... fn(); ...};;)

There are other, related cases, like:

  for (let [i, inc] = [0, function() {i++;}]; i < n; inc()) ...

In that earlier post, I wrote that "the modifications [to MarkM's
desugaring] needed to make these work are pretty straightforward,"
though I can't recall what I had in mind at the time.

Waldemar's option (above) solves the recursive function case, but not
the local-inc case. Even as the loop rebinds i and inc, the latter
will continue to refer to (and increment) the initial binding of i.


More information about the es-discuss mailing list