Re: ES6 problem with private name objects syntax

2014-01-13 Thread Maciej Jaros
Sorry for not answering sooner... Rick Waldron (2014-01-08 23:24): On Wed, Jan 8, 2014 at 3:59 AM, Maciej Jaros e...@wp.pl mailto:e...@wp.pl wrote: To my understanding private name objects are supposed to make private properties and functions available for new classes syntax in

Re: ES6 problem with private name objects syntax

2014-01-13 Thread Brendan Eich
Maciej Jaros wrote: So basically one could implement Symbol as something similar to GUID generator, right? It should work even if you simply restart a counter and make sure you don't clash with other stuff and e.g. return __#symbol#__1, __#symbol#__2 and so on. No. There must be no way, by

ES6 problem with private name objects syntax

2014-01-08 Thread Maciej Jaros
To my understanding private name objects are supposed to make private properties and functions available for new classes syntax in ECMAScript 6 standard. But the syntax is rather strange: ``` var myPrivate = new Name(); class Test { constructor(foo) { this[myPrivate] = foo;

Re: ES6 problem with private name objects syntax

2014-01-08 Thread David Bruant
Hi Maciej, Le 08/01/2014 09:59, Maciej Jaros a écrit : To my understanding private name objects Note that now their name is symbol and not private name anymore. are supposed to make private properties and functions available for new classes syntax in ECMAScript 6 standard. A private keyword

Re: ES6 problem with private name objects syntax

2014-01-08 Thread Rick Waldron
On Wed, Jan 8, 2014 at 3:59 AM, Maciej Jaros e...@wp.pl wrote: To my understanding private name objects are supposed to make private properties and functions available for new classes syntax in ECMAScript 6 standard. But the syntax is rather strange: ``` var myPrivate = new Name(); class