Identity vs equality (was Re: [Newbies] Assignment)

Andreas Raab andreas.raab at gmx.de
Mon Aug 13 07:22:51 UTC 2007


Keith Hodges wrote:
> Surely the question is one of value versus identity. Which leads to the 
> question, what 'value' does #hello represent. To me the fact that it is 
> a symbol is an implementation detail encapsulated inside the 
> implementation. Its external behaviour is that of a string literal (i.e. 
> immutable) as is its value.
> 
> I see this as analogous with numbers. Is 1 = 1.0 and 1.0 = 1. I should 
> hope so. 1.0 is implemented according to the float internal 
> representation, and 1, is implemented as a literal.

Thanks for the example. It's a very good analogy.

Cheers,
   - Andreas



More information about the Squeak-dev mailing list