Private Slots

Nathan Wall nathan.wall at
Tue Jan 15 10:54:20 PST 2013

> Sure - and approaches like this (or simpler - people are clever!) can 
> be factored away into a neat library, without having to mess with the 
> underlying object model. 
> ES6 provides WeakMaps and Proxies. Why not see what people do with 
> those before introducing private slots? 

Is it really such large change to the object model? Couldn't it be considered something akin to an extra property descriptor? Non-enumerable properties don't show up in or Object.keys. This is sort of "non-reflectable". Non-reflectable properties don't show up in, Object.keys, or Object.getOPN.


More information about the es-discuss mailing list