Prototypes

Dan Ingalls DanI at wdi.disney.com
Wed Feb 25 15:47:37 UTC 1998


>Is there any interest in making Squeak prototype-based?

John Malone and I have several times threatened to do this.  What we had in mind as a first pass would actually be quite simple, and we thought we could pull it off in about a week...

1.  For every class identify a prototypical instance.

2.  [this has already been done] Define a fast primitive message, clone, that returns a shallow copy of any instance.

3.  Go through Squeak's class library, changing it so that the global names like Rectangle, Date, etc. referred to these prototypical instances, not to classes.

4.  Make another pass through the library, eliminating all metaclass methods.  These fall into several categories, for class initialization, for creating initialized instances, and for functions generally related to that class.  Most of these would simply move into new categories of the class.

5.  Throw away the metaclasses, simplify the browser, and throw a party.

	- Dan





More information about the Squeak-dev mailing list