Domenic Denicola wrote:
From: Brandon Benvie [[email protected]]
Sent: Thursday, January 10, 2013 11:50
They both have their place since there's many uses for both inherited and
non-inherited private values.
Of course, (non-)inheritance is a great point.
Amusingly, using "conventional" OO terminology, it seems private symbols give you something like
"protected" and weak maps give you "private".
Private symbols can give you true privacy. Just confine that symbol!
The distinction for OO fans that I see is class-private vs.
instance-private: a well-confined private symbol for a prototype method,
e.g., gives you class-private methods. A WeakMap keyed by instance
identity, like the closure pattern for OO in JS, gives you instance-private.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss