Private Names and Methods

Brendan Eich brendan at mozilla.org
Fri Apr 6 11:58:01 PDT 2012


Russell Leggett wrote:
> And would result in copying all of the properties from myMixin into 
> the object literal.

Including the private-named properties? That would be bad for integrity: 
Alice can't give Bob an object-as-capability where the private names 
stay private. Bob can extract them via this hypothetical 
spread-in-braces and then abuse them (e.g. to brand a counterfeit object 
and fool Carol into thinking it was from Alice).

/be


More information about the es-discuss mailing list