Brian Di Palma (2013-04-28T18:34:19.000Z)
github at esdiscuss.org (2013-07-12T02:26:58.882Z)
Another mail that I expected to receive more attention that hasn't... We're London based so we had attendants at JQueryUK and the announcement of private class state in ES6 was a surprise, a pleasant one but still surprising. Is it the case that the announcement was jumping the gun? Needless to say for programming with large code bases it would be excellent to have private state. From the meeting notes thought it does not seem as if this has been agreed to. > YK: So, what is your proposal? > > MM: > > My proposal is the private symbols get postponed to ES7 WeakMap gets renamed to reflect the inverted thinking If we adopt the @ syntax in ES6, I want to be able to use a WeakMap on the right side > > ...Don't care so much about the renaming, but feel that it could add clarity to the feature > > RW: (Disagree based on experience teaching the concept) > > WH: no consensus on class without private symbols > > MM: Rick, can you find the history of this? > > RW: (recounts two meetings where Waldemar was not present, but a > general consensus existing with the understanding that Waldemar would > still have something to say. At Northeasten, Allen presented @-names, > in which Waldemar found to sufficiently meet his privacy requirement > for classes) > > ...Discussion around class private state as a whole. > > BE: We need to synthesize what's going into ES6. Waldemar claims this > must include some way of adding class private state. > > STH: I would like to stop this conversation and allow myself time to > think about this. > > BE: Done. > > Conclusion/Resolution > > Sam, Mark and Allen to work on "relationships" and varied representation in ES6. The `@` syntax is not the nicest but it does highlight private state which is probably a good thing. I'd happily type "IAMTHEWALRUS" if it gave me private state. Well not happily; but I'd still type it. > From the notes it does not seem clear if a lack of private is enough to scupper classes altogether. That would seem an extreme step to take, surely private state can be added in ES7?