On Thu, Sep 19, 2013 at 1:14 PM, Andrea Giammarchi <
[email protected]> wrote:
> I cannot remember if that has been considered historically a Java or PHP
> error/ambiguity ... I'd rather not repeat that in ES6.
>
> A Class constant should have nothing to do with instances but instances
> can have properties that returns that class constant, if needed.
>
> We've got new syntax here so I say this is the easier to
> read/write/understand ... no need a big chapter explaining what's going on
> ^_^
>
> ```javascript
> class A {
> static A.VALUE = 10;
> }
> ```
>
But this doesn't match the existing:
class A {
static foo() {
return "Returned from a class-side method";
}
}
Means: A.foo()
And it's still possible to add:
class A {
static VALUE = 10;
}
Sometime in the future
>
>
> or ...
>
> ```javascript
> class A {
> static {
> VALUE = 10;
> }
> }
> ```
>
This is nice but conflicts with the existing `"static" MethodDefinition`
form
Rick
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss