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

Klaus D. Witzel klaus.witzel at cobss.com
Fri Aug 10 17:12:17 UTC 2007


On Fri, 10 Aug 2007 18:38:22 +0200, Philippe Marschall wrote:

> 2007/8/10, Lukas Renggli <renggli at gmail.com>:
>> > 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.
>
> Unicode arrow assignment operator anyone?

&larr;	←	U+2190 (8592)	HTML 4.0	leftwards arrow

Enjoy
/Klaus

> Cheers
> Philippe
>
>> 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