[Python-Dev] Type/class

Steven D. Majewski sdm7g@Virginia.EDU
Sat, 12 May 2001 16:53:26 -0400 (EDT)


On Sat, 12 May 2001, Guido van Rossum wrote:

> Interesting.  So is the rest of this thread, but since Python is not a
> prototype language and is unlikely to become one, I'd like to mention
> that Python 2.2 will likely allow you to choose either paradigm, on a
> per-class basis, using metaclasses.

 As I said earlier: the only advantage would be if it could simplify 
things "under the hood" (compared to metaclasses) but could still 
provide the same Class semantics (with maybe a "proto" declaration
sneaking it's nose in under the tent.) 
 But I have no immediate idea on how to do that, and it sounds like
you're pretty far along into an implementation already. 

> I'm finding metaclasses in Python useful for different things than
> they are in Smalltalk, and I expect that they will continue to play a
> less important role.  But they are important because they control many
> "policy" aspects of Python classes/types: e.g. whether instances have
> a __dict__ or a specific set of slots (maybe even typed slots),
> whether changes can be made to a class after it's been created, the
> semantics of multiple inheritance, and so on.

 I guess my practical quesion, which I meant to ask before I got
myself sidetracked into preaching prototypes is: How much of the
existing plumbing (specifically the Don Beaudry hack) can I rely
on in the future for the objective-C/python bridge ? 
 With BOOST and Zope's extension classes relying on it, can I 
assume that it's being extended rather than replaced ? 
( I guess I ought to take a look at the code! ) 

> It's an interesting journey!  The book I am reading about this:
> "Putting Metaclasses to Work" by Ira Forman and Scott Danforth.
> http://cseng.awl.com/book/0,3828,0201433052,00.html

Thanks for the reference. 
Talking about interesting journies: 

 Guido: did you ever imagine back at that first workshop at NIST
that you and Python would be where you are today ? 


-- Steve Majewski