Some questions about Private Name Objects

David Bruant bruant.d at gmail.com
Mon Aug 27 07:03:06 PDT 2012


Le 27/08/2012 15:34, Matthew Robb a écrit :
> I'm trying to determine whether when compiling into ES3/5 you could 
> get away with not attaching some .__privates__ property to the object 
> and instead just put a closure around the definitions.
For that question, the answer is you cannot. You cannot faithfully 
polyfill private names.
Interesting experiment by Brandon Benvie : 
http://bbenvie.com/articles/2012-06-06/ES6-Private-Names-Shim

One of these things we need the platform to do for us.

David


More information about the es-discuss mailing list