About String and Symbol equality

SD
stephane ducasse
Sun, Feb 2, 2025 5:35 PM

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

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