Horwat wrote:
My views on this are:
- There should be only *one* syntax for specifying namespaces in definitions.
It shouldn't be
ns::foo = xyz
in one place (object initializers) and
ns var foo = xyz
someplace else (variable definitions).
- The historical reason I chose the syntax
On Apr 16, 2008, at 2:50 AM, Yuh-Ruey Chen wrote:
I agree. I don't see why there should be multiple syntaxes that are as
concise as each other and both have about equal precedent (AS3 vs.
E4X).
If in some futuer spec, properties can inhabit multiple namespaces,
then
we can consider the
Here are some other interesting cases involving destructuring patterns.
Qualified syntax:
var {x = ns::x, y = ns::y, z = ns::z}: {x:A, y:B, z:C } = ...
var [ns::x, ns::y, ns::z}: [A, B, C ] = ...
Attribute syntax:
ns var {x, y, z}: {x:A, y:B, z:C} = ...
ns var [x, y, z]: [A, B, C]
There is an old downside to the attribute syntax: You can't put line breaks
between the attributes and the definition, even though it's tempting to do so
on long lines. Otherwise you silently change the meaning of existing ES3 code
like:
foo
var bar = 3
Waldemar
Jeff Dyer wrote:
Here
My views on this are:
- There should be only *one* syntax for specifying namespaces in definitions.
It shouldn't be
ns::foo = xyz
in one place (object initializers) and
ns var foo = xyz
someplace else (variable definitions).
- The historical reason I chose the syntax
ns var foo = xyz