Prototypes

Steve Dekorte steve at inquisit.com
Tue Mar 3 18:47:38 UTC 1998


> > With classes you know where all the code is... With
> > Prototypes, it is really easy to modify an object -- just
> > add an instance variable, or add a method.  You end
> > up with thousands of variants.  Most of these variant
> > objects do not have names.

Does every morph have a name?

>I strongly agree with this. In my experience, classes have been a very useful organizing
>principle; I wouldn't want to throw them away yet (I definitely wouldn't throw a party :).

You really don't have to "throw away" anything. From a "class" consumer's point of view,
there's no difference between a class and a proto with the clone method renamed "new".
The only difference is more flexibility for the developer and you can limit that however
you like in the development enviroment.

The earlier point that flexibility/freedom is dangerous is true.
Smalltalk has already made this trade off though. The fact that you can
change a system class at runtime in Smalltalk means it's quite easy to corrupt
the entire system from within it. But this is also very powerfull.

I wonder what sorts of opposition the Smalltalk view of being able to change things
at runtime and other dangerous features(no type checking, late binding...) ran
into in it's early days?

Steve





More information about the Squeak-dev mailing list