No, you did not get the point.
Would you say that:
(Collection new add: $f; add: $o; add: $o; yourself) == (Collection new add: $f; add: $o; add: $o; yourself) ?
Besides, the last example in my mail is also worth explaining...
On 14 Feb 2007, at 14 February/20:58, Bert Freudenberg wrote:
On Feb 14, 2007, at 20:27 , Roel Wuyts wrote:
'foo' = 'foo' true "ok" 'foo' == 'foo' true "NOT OK" [...] I can only conclude that this is really not what you want.....
Why? If you want to test for identity, use a Symbol.
:-)
IMHO this is splitting hairs over a non-issue. The issue is mutability of literals.
If Squeak is the only Smalltalk that has this behaviour for Strings, than it shows that is definitely an issue........... I ported T-Gen and the ParserCompiler, and suddenly this non-trivial issue becomes vital. We are still unable to port the logic language Soul to Squeak because of this issue, because, sorry, symbols use a flyweight pattern and are unique while Strings are collections of characters and should behave as such. It is a simple issue in itself. Besides, if it would be only splitting hairs, then why are all beginner's books full of warning for this issue ? Ever tried to teach Smaltalk to a class of newbies ? Ever had students come up to you because when they find some examples in a book or on the web and they tried in Squeak the results are different ? Think about Smalltalk being this nice and clean language where everything is logical and then having to remember by heart some stupid rules because I am splitting hairs ???????
Besides, have a look at the last part of my mail. Would you not consider this wrong ? Depending on whether you call the behaviour from a method or not you get different behaviour ???????????????
[PS: Yes, you hit a sore spot there]
-- Roel