To make String and Symbol ANSI compliant regarding #=
R. A. Harmon
harmonra at webname.com
Sun Apr 16 19:39:21 UTC 2000
At 01:40 AM 4/16/00 +0200, Stephan Rudlof wrote:
>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?
>I think this is a serious compatibility problem, not just an academic
>To make String and Symbol ANSI compliant
> 'foo' = #foo -> false
>(symmetry leads to same result for #foo = 'foo' automagically then) by
>- changing SequenceableCollection>>= to be conformant to protocol
>- removing #= from String (semantically, means it has to be the same
>result as SequenceableCollection>>=).
An error on my part. Change species to class instead.
>Both changes were suggested by Richard.
>(2) check code for all potential (!) occurences of the case
> 'foo' = #foo
>(true so far, but not after ANSI) then and rework it -> difficult for
>Changing the ANSI standard: it is a draft! Or is it official now?
It is official now. Change the standard might be a tough sell as my
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"
*** Note I used the ANSI syntax for symbol literal #'aSymbol'
not the ANSI syntax for selector literal #aSelector
>Do we want to have ANSI compliance at all?
My selfish answer? YES!!!!!
I think there is a long list of advantages ANSI compliance would bring to
>Do we want to have ANSI compliance here?
I think the choice of sort of ANSI compliance is problematic. What is
compliant enough? I guess I think of it as ANSI compliant or not. I'm not
sure what sort of buys you.
Richard A. Harmon "The only good zombie is a dead zombie"
harmonra at webname.com E. G. McCarthy
More information about the Squeak-dev