Rick Waldron wrote:
Thanks Rick. For lurkers:
o.{
foo() // No semi
.bar() // Is this o.bar()? or .bar() on the result of foo()?
};
I've been following and have read back in the thread, but I'm not
seeing a how ".bar()" would be allowed?
In the with example that Dave gave:
with (obj) {
foo() // no semi
.bar = 12
}
it's all allowed as in no syntax error (to correct via ASI) and no
restricted production (to make line termination significant).
Over the years people have suggested reforming 'with' a la VB by
requiring leading . before names meant to be looked up in the 'with'
object instead of the scope chain. But that fails as Dave showed.
T.J. was suggesting that Dave's cascade proposal has the 'with' hazard,
but it doesn't. No scope chain lookup. Therefore no need for leading .,
~. or any such noise.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss