how to test, if the class has "shared identity" of instances in the whole image (SmallIntegers, Symbols...)

Petr Fischer petr.fischer at me.com
Wed Feb 20 13:31:31 EST 2019


Hello, some classes, like Symbols or SmallIntegers, shares identity of value instances in the whole image (I may say it wrong), so:

1 == 1 copy. [true]
#aaa == #aaa copy. [true]

all other classes not, like Strings, Objects etc., so:

'aaa' == 'aaa' copy. [false]

Is there any test method (maybe on the class side) I could ask for this (isXXX)?

Thanks! pf



More information about the Pharo-users mailing list