To make String and Symbol ANSI compliant regarding #=

Stephan Rudlof sr at evolgo.de
Sun Apr 16 22:50:52 UTC 2000


Stefan Matthias Aust wrote:
> 
> >Symmetry is a must, IMNSHO. What about ANSI compliance?
> 
> I'd see it the other way round: ANSI compliance is a must.

Symmetry is ANSI compliant, too...

> Actually, the
> problem IMHO is that you see Symbol as a subclass of String.

Symbol *is* - currently - a subclass of String.

> Don't do
> this.  Symbols aren't strings and as you cannot compare apples and PCs -
> err pears - there shouldn't be a need to use "=" here at all.

You are right! Code which relies on the #= -ness of String and Symbol
has to be avoided. But because it was such a long time possible to treat
'foo' as #foo, there are possible error sources... -> see my other
mails, too.

> 
> So, my solution would be to find and fix all places where Strings and
> symbols are compared.

Ok.

> I'd even think about moving Symbol to a very
> different place in the class hierarchy.

Why? This is not, because I'm against this idea (no opinion), I'm just
interested in the reasons why we should do this in your opinion.

Greetings,

Stephan

> 
> bye
> --
> Stefan Matthias Aust  //  Bevor wir fallen, fallen wir lieber auf.

-- 
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