Ducks, Rabbits, and Privacy

Brendan Eich brendan at
Thu Jan 24 10:45:07 PST 2013

Benoit Marchant wrote:
> Isn't it possible internally to allow a property access only by "this" ?

No. For one thing, the design has to include class-private instance 
variables, not instance-private, so you need as well as (consider private x and y for Point2D add method).

Also, again, we're not enforcing privacy at the descriptor level with 
some kind of access control monitor, rather through "names" (whether 
symbols or weakmaps) as capabilities. Avoids confused deputy attacks.


More information about the es-discuss mailing list