[Python-Dev] Classes and Metaclasses in Smalltalk

Greg Ewing greg@cosc.canterbury.ac.nz
Thu, 03 May 2001 15:25:12 +1200 (NZST)


Gordon McMillan <gmcm@hypernet.com>:

> I would like to see ... some discussion of the expected 
> pragmatic benefits. (That's a different topic from subclassing 
> types.)

Actually, it's not -- the two issues are connected.

Suppose we succeed in unifying types and classes. Then
instead of classes being of type ClassType, they are
now instances of ClassClass. So classes are also
instances, or in other words, we have unified classes
and instances.

So even if we don't go as far as adding Smalltalk-style
class-methods-via-metaclasses, we still have to deal
with the fact that some things will be both classes
and instances.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+