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

Andrew Tween amtween at hotmail.com
Fri Aug 10 17:05:52 UTC 2007


"Philippe Marschall" <philippe.marschall at gmail.com> wrote in message 
news:66666f210708100938l3768cc9uaf2b0c443bb7985b at mail.gmail.com...
> 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?

Is detected by string comparison rather than by character...

currentToken = ':=' or: [currentToken = '_' or:[currentToken = 16r2190 
asCharacter asString]]

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