Hi,

In message "subclassing Integer"
    on 02/09/20, John Tromp <tromp / dorado.ins.cwi.nl> writes:

|I'm writing a state space search program where each state can be consisely
|described by an Integer. I need these states to have several new methods.
|
|I can either
|1) create a new class with an Integer attribute
|or
|2) try to subclass Integer
|or
|3) pass around Integers to methods of another class
|
|Option 2) appears to be possible, but perhaps useless, as I cannot
|seem to generate objects of the new type:

Integer is a pure virtual class (in C++ terms).  And its concrete
subclass Fixnum is not suitable for subclassing, since it is a
immediate value.  So your choice should be either 1 or 4) add methods
to Integer class.

							matz.