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

Lukas Renggli renggli at gmail.com
Fri Aug 10 16:14:23 UTC 2007


> I recently modified Shout to use == instead of = when comparing a character
> from the input stream to a literal char ( e.g. next == $- ). It produced a
> measurable speed-up; but now I am feeling guilty ;)

Please note that:

    (Character value: 6543) == (Character value: 6543) -> false

This will break as soon as you use WideString as source-code. I had to
modify the runtime and compiler of SmaCC to send #= to characters to
fix some subtle bugs.

Cheers,
Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch



More information about the Squeak-dev mailing list