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 |ns1 ns2 ... var foo| syntax again.
-Yuh-Ruey Waldemar 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 > ns var foo = xyz > for ES4 was that I allowed the same definition to simultaneously go into > several namespaces: > ns1 ns2 ns3 var foo = xyz > would create ns1::foo, ns2::foo, and ns3::foo, which would be aliases of the > same variable (not three different variables). ES4 doesn't support that any > more, so this reason goes away and the issue can be reconsidered. > > Now that the issue has been brought up, I'm warming up to the syntax > var ns::foo = xyz > everywhere. It's simpler to remember. It doesn't match Java, but if that > were a goal then we should first change our type annotation syntax to that of > C++ and Java. > > Waldemar > _______________________________________________ Es4-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es4-discuss
