> and redefines the SVE of ${=x.y} to be
> 
>     function () { return arguments.length ? (x.y = arguments[0]) : x.y }
> 
> so instead of passing substitution values, for read-only substitutions
> (those without the = modifier) you get a thunk, and for writable
> substitutions you get a function that returns the value when called
> with 0 arguments or assigns the first parameter if passed one.


Ah, nice. I would have handed in an array of substitutions, let the handler 
change an array element and then performed an assignment such as
    x.y = substs[0].

The above solution is better, because the desugaring is local.

Axel

-- 
Dr. Axel Rauschmayer

a...@rauschma.de
twitter.com/rauschma

home: rauschma.de
blog: 2ality.com



_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to