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 other.foo as well as this.foo (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.

/be
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to