Not that anyone else probably cares, but the ANSI standard says - for All objects x y, x = y if and only if y = x. The Smalltalk-80 mixup over String and Symbol violated this, ‘X’ = #x but #x ~= ‘x’. - two sequences are = iff they are the same size, corresponding elements are =, AND they are instances of the same class. - String is not a special case.
I note that this definition, which was a break with tradition, was agreed by all Smalltalk vendors and some famous industry representatives more than 25 years ago, which should have given people time to catch up. I do appreciate that the developers of Squeak had other maddened grizzly bears to stun, but given the confusion, anyone who used strings and symbols as elements of the same set or keys of the same dictionary was already in for a lot of pain when they tried to port their code. Any code badly affected by the proposed change was already broken (because symol equality is temporally stable and string equality isn’t, among other things). Trying to support both the broken traditional and the corrected ANSI definition at the same times like a lot of effort. How would that work? On Mon, 3 Feb 2025 at 6:36 AM, stephane ducasse <stephane.duca...@inria.fr> wrote: > Hello people > > In Pharo (following Squeak tradition) a string is equals to its symbol > representation. > e.g. > ’tintin’ = #tintin > > true > > In other Smalltalk dialects this is not the case. > > We have been working (sponsored by Lifeware) to support both semantics > (yes this is a kind of > daunting task and it can raise bugs). > > Our objective is to help people make business with Pharo. So “simple” > cross compatibility is something that we consider e.g. to deploy > applications in Gemstone for example. > (We would love to have a Pharo compiler working on Gemstone generating > Gemstone VM bytecodes this is why we love the work of James Foster but this > is another story). > > So since we are pragmatic people we could be convinced that the semantics > of Pharo is not good :) > and that by default we should use the semantics of GS or VW. > > The first step is to be able to choose which one to use within Pharo and > be able to switch. > We are nearly there for Pharo 13. > > The second step is to get a nice default. > And we need the help of the community for this. > > Do you have any advice, arguments for and against any of the two choices > that could be put on the table to influence our decisions for Pharo 14. > > So let us know :) > > Stef on the behalf of the Pharo consortium. > > > Stéphane Ducasse > http://stephane.ducasse.free.fr > 06 30 93 66 73 > > "If you knew today was your last day on earth, what would you do > differently? ....ESPECIALLY if, by doing something different, today > might not be your last day on earth.” Calvin & Hobbes > > > > > >