Trimming cc: list to just es-discuss.

Mark S. Miller wrote:
  * Completing the class design
      - at least high integrity and private state

If I'm not mistaken, we need class-private syntax for classes to have ultimate double-blind consensus in *ES6*. See last meeting notes.

At JQueryUK, I threw up a sketch in slides based on http://wiki.ecmascript.org/doku.php?id=strawman:relationships:

|class  SkinnedMeshextends  THREE.Mesh{
  private  identityMatrix,
          bones,
          boneMatrices;

  constructor(geometry,  materials)  {
    super(geometry,  materials);

    this@identityMatrix=  new  THREE.Matrix4();
    this@bones=  [];
    this@boneMatrices=  [];
    ...
  }

  ...
}|


The TypeScript (CoffeeScript had it already, and more concisely via @) option to declare and initialize via a private prefix on one of constructor's parameters would be helpful to many developers:

|class  Point{
  constructor(private x, private y) {}
  add(other) {
    return Point(this@x + other@x, this@y + other@y);
  }
  ...
}
|


I hope we can agree to do this much for ES6, based on the relationships work, which I'd like to thank Tom and you for championing. At first I thought it was not helpful, but then the lightbulb went off ;-).

/be

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to