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

Philippe Marschall philippe.marschall at gmail.com
Fri Aug 10 14:12:53 UTC 2007


2007/8/10, Göran Krampe <goran at krampe.se>:
> Hi!
>
> > For sure, #== has been used with Symbols which can compare really fast
> > instead of enumerating characters...
> >
> > But since in modern Squeak 'Hello' = #'Hello', i'am not sure that old
> > style optimizations #== don't introduce bugs now...
> >
> > Nicolas
>
> Hmmm, odd:
>
> 'Hello' = #'Hello' -> true
>
> #'Hello' = 'Hello' -> false
>
> ...that seems to indicate something is a bit wrong. ;)

It reflects precisely the difference between Strings and Symbols IMHO.

Cheers
Philippe


More information about the Squeak-dev mailing list