I should say that I always like the fact that
'abc' = #abc --> false #abc = 'abc' --> false
Because a symbol and a string are different to my eyes. But when there was the discussion a while back I understood that a symbol is a kind of string. Now how can we make progress on that point - evaluate the risks - write some tests for strings and symbols - give a try - but do that for pharo 1.1 :) stef On Nov 14, 2008, at 7:46 AM, Lukas Renggli wrote:
I want to open this for discussion:
In all Smalltalk dialects the following expressions evaluate to false:
'abc' = #abc --> false #abc = 'abc' --> false
This means a String and a Symbol is never the same thing, even if they contain the same characters. In Squeak/Pharo this is different though (at least this is symmetrical, pre 3.9 this wasn't even symmetrical):
'abc' = #abc --> true #abc = 'abc' --> true
Unfortunately this difference makes writing portable code that deals with symbols and strings a huge pain. And it is hard to test, debug and find those kind of problems.
I wonder if it would be possible to change that behavior in Squeak to match the other Smalltalk implementations? I guess this would break some code, but at least this problem would then be gone forever.
Lukas
-- Lukas Renggli http://www.lukas-renggli.ch
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project