February 4, 2011
Number.prototype.klass = Smalltalk.classes.numberClass;
However, as I said above, both integer and decimal numbers will have the same “Number” class.
In Squeak, “Number” is an abstract class with several concrete subclasses such as “Float”, “Fraction”, “Integer”, and “ScaledDecimal”; and “Integer” itself has the subclasses “LargePositiveInteger”, “LargeNegativeInteger”, and “SmallInteger”.
In some architectures there may be a performance advantage to using say “SmallInteger” instead of “Integer” or “Integer” instead of “Float”. I am certain that the designers of Squeak had valid reasons for creating multiple number representations.