[BUG] equivalence between strings and symbols

Stephan Rudlof sr at evolgo.de
Sun Apr 16 22:41:09 UTC 2000


"R. A. Harmon" wrote:
> 
> At 12:21 AM 4/16/00 +0200, Stephan Rudlof wrote:
> >Another question is, how much and *which* code has to be changed cause
> >it relies on
> >       'someString' = #someString
> >and
> >       #someString = 'someString'
> 
> I'm not sure how much work this change will entail.

Here was an error of mine: Because of the asymmetry regarding #= in 2.7,
only the cases
	'someString' = #someString
should be danger for trouble;
	#someString ~= 'someString'
anyway; with or without ANSI, but not with last symmetry suggestions!

> >> This seem (large grain of salt here) to work OK, but I haven't really tested
> >> it or done much work while these changes are in effect.
> >
> >It's interesting to evaluate
> >       Smalltalk recompileAllFrom: 'Aardvark'.
> >and play around after a little bit.
> [snip]
> 
> I didn't do this after making the changes.  When is this necessary?

What do you mean with necessary? Recompiling the whole system is just a
good practical performance and integrity test for Symbols and Strings
(but it takes some time ;-( ).

> 
> These proposed changes do bring the following Squeak results in line with
> those of Dolphin 3.0 and VWNC 3.0:
> 
>         'abc' sameAs: 'ABC'             "-> true"
>         'abc' = 'ABC'                   "-> false"
>         #'abc' = 'abc'                  "-> false"
>         'abc' = #'abc'                  "-> false"
>         'abc' sameAs: #'abc'            "-> true"
>         #'abc' sameAs: 'abc'            "-> true"

That's great!

Greetings,

Stephan

> 
> --
> Richard A. Harmon          "The only good zombie is a dead zombie"
> harmonra at webname.com           E. G. McCarthy
> Spencer, Iowa

-- 
Stephan Rudlof (sr at evolgo.de)
   "Genius doesn't work on an assembly line basis.
    You can't simply say, 'Today I will be brilliant.'"
    -- Kirk, "The Ultimate Computer", stardate 4731.3





More information about the Squeak-dev mailing list