Brendan Eich (2013-04-21T17:22:53.000Z)
github at esdiscuss.org (2013-07-12T02:26:55.511Z)
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: ```js class SkinnedMesh extends 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: ```js 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 ;-).