> On 6 Mar 2019, at 15:15, Richard O'Keefe wrote:
>
> Surely a Symbol should never be #= to anything that is not
> a Symbol? At least in VW, GST, Dolphin, and VAST,
> #a = 'a'
> 'a' = #a
> both answer false, and I'd be rather upset if a symbol
> ever compared equal to a string. The ANSI Smal
Surely a Symbol should never be #= to anything that is not
a Symbol? At least in VW, GST, Dolphin, and VAST,
#a = 'a'
'a' = #a
both answer false, and I'd be rather upset if a symbol
ever compared equal to a string. The ANSI Smalltalk standard
says in several places that "Symbol objects are identi
Richard Sargent wrote
> As an aside, this is the kind of information that should be in a method's
> comment. Rationale and explanation, rather than what it does.
Yes!!!
-
Cheers,
Sean
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
On Fri, Mar 1, 2019 at 12:02 PM Sven Van Caekenberghe wrote:
> Ah, it is an optimisation: if the first #== fails, but the argument is
> also a Symbol, then that means the are different for sure, so false is
> returned early, instead of failing in super's #= after that.
>
> And with ByteSymbol and
Ah, it is an optimisation: if the first #== fails, but the argument is also a
Symbol, then that means the are different for sure, so false is returned early,
instead of failing in super's #= after that.
And with ByteSymbol and WideSymbol, although they are exclusive (can never be
equal), they c
Is it consistent with the definition of #= in String such that
'aSymbol = aString' iff 'aString = aSymbol'?
Sorry, I don't have an image at hand.
Am 1. März 2019 18:40:11 MEZ schrieb Sven Van Caekenberghe :
>Why ? Please explain ...
>
>> On 1 Mar 2019, at 18:02, David T. Lewis wrote:
>>
>> On F
Why ? Please explain ...
> On 1 Mar 2019, at 18:02, David T. Lewis wrote:
>
> On Fri, Mar 01, 2019 at 05:18:27PM +0100, Sven Van Caekenberghe wrote:
>>
>>
>>> On 1 Mar 2019, at 17:08, Petr Fischer via Pharo-users
>>> wrote:
>>>
>>>
>>> From: Petr Fischer
>>> Subject: Symbol equality metho
On Fri, Mar 01, 2019 at 05:18:27PM +0100, Sven Van Caekenberghe wrote:
>
>
> > On 1 Mar 2019, at 17:08, Petr Fischer via Pharo-users
> > wrote:
> >
> >
> > From: Petr Fischer
> > Subject: Symbol equality method #= - weird condition in the Pharo sourcecode
> > Date: 1 March 2019 at 17:08:03 G
> On 1 Mar 2019, at 17:08, Petr Fischer via Pharo-users
> wrote:
>
>
> From: Petr Fischer
> Subject: Symbol equality method #= - weird condition in the Pharo sourcecode
> Date: 1 March 2019 at 17:08:03 GMT+1
> To: pharo-users@lists.pharo.org
>
>
> Hello, this is Symbol equality method in
--- Begin Message ---
Hello, this is Symbol equality method in Pharo:
1: = aSymbol
2: "Compare the receiver and aSymbol."
3: self == aSymbol ifTrue: [^ true].
4: self class == aSymbol class ifTrue: [^ false].
5: "Use String comparison otherwise"
6: ^ super = aSymbol
Look
10 matches
Mail list logo