[Pharo-dev] Can we override == in Pharo ?

2014-01-06 Thread Clément Bera
Hello, here I have a class A== ^ true Now: a := A new. b := A new. a == b Answers false a perform: #== with: b Answers true Do I have to remove the usage of the byte code for #== in the compiler to be able to override == ?

Re: [Pharo-dev] Can we override == in Pharo ?

2014-01-06 Thread Nicolai Hess
2014/1/6 Clément Bera bera.clem...@gmail.com Hello, here I have a class A== ^ true Now: a := A new. b := A new. a == b Answers false a perform: #== with: b Answers true Do I have to remove the usage of the byte code for #== in the compiler to be able to override == ? No,

Re: [Pharo-dev] Can we override == in Pharo ?

2014-01-06 Thread Frank Shearar
On 6 January 2014 11:11, Nicolai Hess nicolaih...@web.de wrote: 2014/1/6 Clément Bera bera.clem...@gmail.com Hello, here I have a class A== ^ true Now: a := A new. b := A new. a == b Answers false a perform: #== with: b Answers true Do I have to remove the usage of the byte

Re: [Pharo-dev] Can we override == in Pharo ?

2014-01-06 Thread Igor Stasenko
On 6 January 2014 10:56, Clément Bera bera.clem...@gmail.com wrote: Hello, here I have a class A== ^ true Now: a := A new. b := A new. a == b Answers false a perform: #== with: b Answers true Do I have to remove the usage of the byte code for #== in the compiler to be able to

Re: [Pharo-dev] Can we override == in Pharo ?

2014-01-06 Thread Camille Teruel
On 6 janv. 2014, at 10:56, Clément Bera bera.clem...@gmail.com wrote: Hello, here I have a class A== ^ true Now: a := A new. b := A new. a == b Answers false a perform: #== with: b Answers true Do I have to remove the usage of the byte code for #== in the compiler to be

Re: [Pharo-dev] Can we override == in Pharo ?

2014-01-06 Thread Alexandre Bergel
You may need to do this if you are using proxies. Alexandre On Jan 6, 2014, at 8:52 AM, Igor Stasenko siguc...@gmail.com wrote: On 6 January 2014 10:56, Clément Bera bera.clem...@gmail.com wrote: Hello, here I have a class A== ^ true Now: a := A new. b := A new. a == b

Re: [Pharo-dev] Can we override == in Pharo ?

2014-01-06 Thread Clément Bera
So I tried and it worked. In Opal to remove the usage of #==, I removed it from the special selector array in the method: IRBytecodeGenerator classspecialSelectorsArray ^ #(#+ 1 #- 1 # 1 # 1 #= 1 #= 1 #= 1 #~= 1 #* 1 #/ 1 #\\ 1 #@ 1 #bitShift: 1 #// 1 #bitAnd: 1 #bitOr: 1 #at: 1 #at:put: 2 #size

Re: [Pharo-dev] Can we override == in Pharo ?

2014-01-06 Thread Marcus Denker
On 06 Jan 2014, at 13:43, Clément Bera bera.clem...@gmail.com wrote: So I tried and it worked. In Opal to remove the usage of #==, I removed it from the special selector array in the method: IRBytecodeGenerator classspecialSelectorsArray ^ #(#+ 1 #- 1 # 1 # 1 #= 1 #= 1 #= 1 #~= 1

Re: [Pharo-dev] Can we override == in Pharo ?

2014-01-06 Thread Camille Teruel
On 6 janv. 2014, at 13:55, Marcus Denker marcus.den...@inria.fr wrote: On 06 Jan 2014, at 13:43, Clément Bera bera.clem...@gmail.com wrote: So I tried and it worked. In Opal to remove the usage of #==, I removed it from the special selector array in the method: IRBytecodeGenerator

Re: [Pharo-dev] Can we override == in Pharo ?

2014-01-06 Thread Camille Teruel
On 6 janv. 2014, at 13:30, Alexandre Bergel alexandre.ber...@me.com wrote: You may need to do this if you are using proxies. The fact that #== is not sent is actually really useful for proxies. Because if #== were intercepted by the proxy and forwarded to the target then there is no

Re: [Pharo-dev] Can we override == in Pharo ?

2014-01-06 Thread Igor Stasenko
On 6 January 2014 14:21, Camille Teruel camille.ter...@gmail.com wrote: On 6 janv. 2014, at 13:30, Alexandre Bergel alexandre.ber...@me.com wrote: You may need to do this if you are using proxies. The fact that #== is not sent is actually really useful for proxies. Because if #== were