[Python-Dev] Type/class

Thomas Heller thomas.heller@ion-tof.com
Fri, 11 May 2001 17:40:10 +0200


>  Reading up on MetaClasses in Smalltalk again makes me appreciate
> the simplicity of a prototype system where everything is just
> an object -- all objects can be cloned, and some objects are 
> only used for cloning -- they are the exemplars of their type
> which fill the role of Classes. 
> 
>  Unfortunately, although prototypes would be a lot simpler, it 
> would be a pretty incompatible change for Python -- I can't think
> of any way to get there without a lot of breakage. 
> 
>  (Still -- I wonder if there's a way they could be used under
> the covers in the implementation to make it simpler. Prototype
> semantics are basically a superset of Class based semantics, which
> is how it was easy to do Smalltalk in Self.)

I never looked at Self or other prototype based systems.
Is it really true that prototypes are a lot simpler than
metaclasses, but on the other hand more powerful?

The 'brain exploding properties' of metaclasses are IMO
only there because my brain cannot think easily in too
many recursion steps...

Thomas