On Jan 30, 2008 9:35 AM, Jeff Dyer <[EMAIL PROTECTED]> wrote:
>
> Here's another example, which packages won't help with:
>
>   import org.ecmascript.a;
>   var org = {ecmascript: 4}
>
>   ... = org.ecmascript.a   // error: a is undefined in 'ecmascript'
>
[...]
>
> What do you suggest we do differently?

The obvious thing would be to change package reference syntax, e.g.,
by using a symbol other than periods. But this would break backwards
compatibility, so it's not an option.

In prior cases of language ambiguity, an alternate syntax was created.
For example "Array(x)" was ambiguous, so "x as Array" was created as
another way to cast variables. Similarly, there could be an alternate
syntax for inline package references, e.g.,
"package(org.ecmascript).a".

This kind of seems like language bloat, though. In practice, just
about everyone uses capitalized camel-humped names for classes and
lower-case camel-humped names for fields and methods, so this issue
doesn't come up.
-- 
T. Michael Keesey
Director of Technology
Exopolis, Inc.
2894 Rowena Avenue Ste. B
Los Angeles, California 90039
http://exopolis.com/
--
http://3lbmonkeybrain.blogspot.com/
_______________________________________________
Es4-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es4-discuss

Reply via email to