To make String and Symbol ANSI compliant regarding #=

Lex Spoon lex at cc.gatech.edu
Mon Apr 17 01:25:35 UTC 2000


Stephan Rudlof <sr at evolgo.de> wrote:
> Dear Squeakers,
> 
> currently (2.7) we have
> 	'foo' = #foo -> true
> 	#foo = 'foo' -> false
> .
> Last suggestions of me and Dan ensure symmetry for comparison of Symbols
> and Strings, but not ANSI compliance.
> Symmetry is a must, IMNSHO. What about ANSI compliance?
> 

My understanding after Allen Wirfs-Brock's post was that ANSI requires
symmetry, but that it doesn't require #abc ~= 'abc'.  In fact, the
standard is quite loose on the specific definition of #=, and even 'abc'
might not be #= to ('a', 'bc').


My vote is still for #abc = 'abc'.  It's intuitive, if you think of
Symbols as high-performance Strings.  And it turns out not to impact
performance.


-Lex





More information about the Squeak-dev mailing list