[BUG] equivalence between strings and symbols

Bijan Parsia bparsia at email.unc.edu
Wed Apr 5 21:53:28 UTC 2000


On Wed, 5 Apr 2000, John W. Sarkela wrote:
> working with Squeak 2.7 we discovered the following situation
> 
> #squeak = 'squeak' false
> 'squeak' = #squeak true
> 
> mathematics defines equivalence as a relation that is
>     1. reflexive
>     2. symmetric
>     3. transitive
> 
> Well, the above just ain't symmetric.

Thanks because, in this situation #= doesn't represent equivalence!

In keeping with the proposals to Pythonize Squeak's syntax, #= has been
redefined to denote "sorta not assignment", and, as everyone knows Symbols
are very picky about their assignments (they have to watch their image
after all), where as a String will give enough of itself to hang you!

No, I'm just kidding. Fixing this seems like a good idea, but I worry a
touch about breakage of stuff which "accidentally" depends on this
behvaior. I'm not speaking entirely hypothetically, as I seem to recall
difficulty with nil, 'nil', and #nil in some package I was porting (alas,
I can't recal the details).

Have you mad eyour proposed change? Did anything obvious break?

Cheers,
Bijan Parsia.





More information about the Squeak-dev mailing list