Should every kernel class x provide support for (x new) printString and (x new) hash

Philippe Marschall philippe.marschall at gmail.com
Sun Jan 21 16:31:15 UTC 2007


2007/1/21, Ralph Johnson <johnson at cs.uiuc.edu>:
> > Funny, (Object new) doesn't have such problems. So, would you say that
> > about "Object new", too. I doubt, because almost every Smalltalk pro does
> > so ;-)
>
> Object has no abstract methods,

Object has abstract methods like every class in Squeak (but two or
three subclasses of ProtoObject).

Philippe

> but it is still an abstract class, and
> I never make instances of it.  i consider it a hack to do so, an
> amusing hack, but a hack nevertheless.  I have been teaching that to
> my students for twenty years, and I do not believe that almost every
> Smalltalk pro makes instances of Object.
>
> Smalltalk does not have static type-checking.  The compiler does not
> stop you from doing stupid things.
>
> An abstract class is a class that you do not instantiate, but use only
> as a superclass.  Sometimes it is hard to tell whether a class is
> abstract, but Collection says it in its comment, and it has a
> #subclassResponsibility method.
>
> -Ralph Johnson
>
>



More information about the Squeak-dev mailing list