Field initializers

Augusto Moura augusto.borgesm at
Sat Mar 18 18:33:57 UTC 2017

How about `own` keyword? It might work with public and private fields, and
seems more elegant (because of destructuring we have a lot of symbols in
the paremeters declaration)

// This will throw a SyntaxError?
class Rectangle {
  constructor(own #x, own #y, own name) {}

There's a new proposal using the `own` keyword in class fields declaration ( It might fit perfectly.
Augusto B. Moura
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list