Syntax error (in some cases)?

On Jun 17, 2011, at 21:38 , Mark S. Miller wrote:

> 
> 
> On Fri, Jun 17, 2011 at 12:18 PM, Mike Samuel <mikesam...@gmail.com> wrote:
> 2011/6/17 Axel Rauschmayer <a...@rauschma.de>:
> > 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.
> >
> > It also allows for multiple evaluation of substitutions which might be
> > useful for looping constructs in the template use-case.
> >
> > Yes, useful. I assume that if the expression is not assignable, trying to
> > use the function as a setter will produce an exception(?)
> 
> That's a good point.  It should but does not currently.
> 
> A failed strict assignment throws, and therefore a failed ES-next assignment 
> does. So are you sure it does not currently throw? From your expansion, I'd 
> expect it does.
> 
>  
> 
> > --
> > 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
> 
> 
> 
> -- 
>     Cheers,
>     --MarkM

-- 
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