static/class properties

Andrea Giammarchi andrea.giammarchi at
Thu Sep 19 11:08:33 PDT 2013

the A.whatever is explicit to the class so it's the less ambiguous, IMO

I see already confusing to understand if properties will be defined in the
instance or in the class ... could not tell easily while I could, reading
`A.VALUE = 10;` instead.

Anyway, using that outside the class definition as:

class A {
  // do whatever in here ...
  // that you want inherited/assigned too
const A.VALUE = 10;

is already good, if possible, and ambiguity free (but I cannot remember the
`const obj.prop = value;` state)

Hopefully in that way instances won't inherit a thing for sure ^_^
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list