Brendan Eich (2013-07-31T15:31:18.000Z)
domenic at domenicdenicola.com (2013-08-02T20:45:19.822Z)
Mark S. Miller wrote: > You're missing my point. My point is independent of whether there are > two classes or one in the scope of your friend declaration. For > simplicity let's say there's only class A. > `this` binding only helps when a method is applied to its bound this, > not to an argument. > > * It does not enable an instance of A to recognize that another instance of A is an A. > * It does not avoid the storage cost of objects-as-closures, since you still need a function object per method per instance. Sorry for being unclear -- my fault for not taking the time to develop the example. An example would have to avoid closure pattern even coming to mind, since I don't think it is relevant. The general problem is making a non-colliding name that can be used in two disjoint scopes, on objects of known provenance.