On Fri, Apr 11, 2008 at 11:04 AM, Lars Hansen <[EMAIL PROTECTED]> wrote:
>
>  > Right, I get that, and Brendan's point was a good one.  I was
>  > just thrown by the fact that I hadn't seen an example of
>  >
>  > class A {
>  >   var public::count = 10;
>  > }
>  >
>  > rather than
>  >
>  > class A {
>  >   public var count = 10;
>  > }
>  >
>  > But if the former is legal (and the grammar suggests that it
>  > is), then there's no inconsistency.
>
>  It is not legal, and if the grammar suggests that it is then
>  the grammar is buggy.

Okay, so why is it a good thing to mandate a different syntax for
defining an object property in an initializer, on one hand, and
defining a property of a class instance, on the other?  Don't get me
wrong:  I understand the utility of allowing the "public var count =
..." syntax, where 'var' in interposed between the two parts of the
name.  What I don't understand is why you wouldn't want a single,
canonical syntax for expressing names in definitions.  "public var
count": could just be sugar for "var public::count".  Or does that
raise other problems...?
_______________________________________________
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss

Reply via email to