Brendan Eich (2013-07-31T05:56:55.000Z)
domenic at domenicdenicola.com (2013-08-02T20:40:11.535Z)
Mark S. Miller wrote: > Only useful for instance-private instance variables, in which case you > may as well use lexically captured per-instance state. No, "friend" is shared between two classes, no way to make a closure per instance extending over both constructors. Pretend the module above is an IIFE. > Doesn't resist theft by proxy, since one can easily construct a proxy > that passes that instanceof test. Ok, forget instanceof. With `this`-binding all around, what's the leak? More generally, are you arguing that leaks are hard to avoid, so we need private fields instead? That fits the relationship vs. unique symbol dichotomy.