--- 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 = aSymbolLook at line 4 - what does it mean? That's wrong, isn't it? Typically, every symbol comparisons end up in line 3, but if you do some work with forward proxies for example, condition on line 3 is "false" and then weird things on line 4 happens. If line 4 and further are correct, can someone explain a little? Thanks! pf
--- End Message ---
[Pharo-users] Symbol equality method #= - weird condition in the Pharo sourcecode
Petr Fischer via Pharo-users Fri, 01 Mar 2019 08:08:59 -0800
- [Pharo-users] Symbol equality method #= - wei... Petr Fischer via Pharo-users
- Re: [Pharo-users] Symbol equality method... Sven Van Caekenberghe
- Re: [Pharo-users] Symbol equality me... Petr Fischer via Pharo-users
- Re: [Pharo-users] Symbol equality me... David T. Lewis
- Re: [Pharo-users] Symbol equalit... Sven Van Caekenberghe
- Re: [Pharo-users] Symbol equ... Steffen Märcker
- Re: [Pharo-users] Symbol equ... Sven Van Caekenberghe
- Re: [Pharo-users] Symbo... Richard Sargent
- Re: [Pharo-users] S... Sean P. DeNigris
- Re: [Pharo-users] Symbo... Richard O'Keefe
- Re: [Pharo-users] S... Sven Van Caekenberghe