On May 31, 2012, at 7:08 PM, T.J. Crowder wrote:

> On 1 June 2012 01:40, Brendan Eich <[email protected]> wrote:
> Let's be precise. You keep bringing 'with' up but it's not relevant to the 
> cascade proposal, going by Dave's definitions. If you have the "appearance of 
> 'with'" concern I call out above, let's argue about that. It's a good one 
> (again it is why I preferred () a day or so ago).
> 
> Yes, that's my concern. Something that looks almost exactly like the old 
> `with`, complete with implicit magic free symbol resolution, worries me. I 
> "keep" bringing up `with` because it's implicit in the proposals. It's not 
> something I'm adding, I'm just shining a light on it.

This is a misunderstanding. There's no such thing as "free symbol resolution." 
There are "free variables" and there is "variable resolution" but "free symbol 
resolution" doesn't mean anything.

In the cascade proposal, the LHS of each item *contains no variables*. It's 
just a property name used on the target object. There's never any ambiguity as 
to whether it might be looked up on the object or looked up in the lexical 
environment.

The RHS of each assignment is just an ordinary expression, and is looked up in 
the ordinary lexical environment.

This is *nothing* like `with`. Your protestations are generating more heat than 
light.

> This is more true of the cascade than object extension literals, but the 
> inclusion of things that look like assignments in object extension literals 
> makes it true of them as well.

Absolutely not. You can argue that the cascade syntax is more *confusing* -- 
and it may well be -- but semantically it's totally the same as the other 
mustache proposals (other than the additional ability to call methods as well, 
but that also introduces no semantic issues with scope).

> Now the cascade:
> 
> array.{
>     pop()
>     pop()
> };
> 
> That looks like `with`, it acts like `with`,

No, it doesn't, and it would be really helpful if you would try to understand 
why it doesn't.

Dave

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to