peskin@caip.rutgers.edu (R. L. Peskin) (05/10/90)
Class Integer in Smalltalk/V Mac has a class method 'new:'. The method
documentation states "Example, Integer new: 4 creates an integer ........". In
fact executing Integer new: 4 (or any other number) gives an error from new: in
Class Behavior. In effect, Integer is not indexable. According to Digitalk,
Integer is meant to be an abstract class. In PPS Smalltalk, Integer is also an
abstract class, but at least the method 'new: neg: ' returns an instance. My
question is why are there class methods in Smalltalk/V that don't apply, i.e.
shouldn't those methods be handled by some reference to "subclass
responsibility"? How does the user know in Smalltalk/V that he dealing with an
abstract class? How would I ever write and test a class method in Smalltalk/V
like 'new: size' for Class Integer?
-- r. peskin <peskin@caip.rutgers.edu>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Richard L. Peskin CAIP Parallel Computing Lab
CAIP Center CN - 1390 Rutgers University
Piscataway, N. J. 08855-1390
net: peskin@caip.rutgers.edu
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%