Robert Feldt <feldt / ce.chalmers.se> writes:

> On Wed, 4 Apr 2001, Dave Thomas wrote:
> 
> > Would the identity be based on the method name, or the method
> > semantics (given that you can redefine methods). I suspect this would
> > be a tricky thing to implement.
> > 
> On the actual code pointed to, ie. convert NODE * body to Integer say
> called code_hash or something. Then one can redefine Method#== and compare
> the code_hash values. Or?

Sorry, I wasn't clear. I was meaning that you'd probably disappoint
some people whichever way you implemented it (name or body).

Possible way round it would be to implement Method#codeHash and
Method#name, so you could say

   m1.codeHash == m2.codeHash

or

   m1.name == m2.name


That way the developer gets control.


Dave