Public/private namespaces in harmony classes proposal

Gavin Barraclough barraclough at
Sat Jul 9 17:23:05 PDT 2011

>> Might it be reasonable to make private properties be regular properties on the object, with a new 'private' attribute, similar to the existing writable/configurable attributes?  From the perspective of code outside of the associated class, an instance's private property would be non-readable, non-writable and non-configurable (likely also non-enumerable?), with any attempt to get, set, or delete the property failing in a similar manner to an existing writable/configurable attribute violation.  It would be great to hear your thoughts on this.
> See above -- private means you can't probe, let alone collide, for the private name from outside of the abstraction. Private name objects prove much more than a single-bit 'private' attribute -- they allow private, protected, friend, shared-secret, and public-but-guarnateed-unique names.
> /be

Got it, cheers gents.


More information about the es-discuss mailing list