Field initializers

Augusto Moura augusto.borgesm at gmail.com
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)

```.js
// 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 (
https://github.com/erights/Orthogonal-Classes). It might fit perfectly.
-- 
Augusto B. Moura
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170318/f8626e2a/attachment.html>


More information about the es-discuss mailing list