For Kenny Tilton: Why do I need macros revisited.

Kenny Tilton ktilton at nyc.rr.com
Sun Aug 24 17:31:05 CEST 2003


Michele Simionato wrote:
> Kenny Tilton <ktilton at nyc.rr.com> wrote in message news:<3F47BDCA.3070001 at nyc.rr.com>...
> 
>>A few months back I started on a PyCells project, and of course was 
>>having great fun down at the metaclass level. It was a little daunting 
>>compared to the Lisp MOP, which just takes the same concepts of calls 
>>and instance and does a conceptual-shift-up (new machine language 
>>instruction?) so a class is now an instance (of a metaclass, which is 
>>just another class really--the "meta" is only to keep one's head 
>>straight). Python might be viewed as easier because it jumps over to 
>>using internals such as that __dict__ thing (sorry if that is wrong, it 
>>has been a while and I only played for a few weeks), so it there is none 
>>of that class-being-an-instance confusion. Fun stuff, either way.
> 
> 
> 
> I don't follow you. In Python it is just the same, a class is just an
> instance of a metaclass, a metaclass is just an instance of a meta-meta
> class, etc. Metaclasses are classes, their simply have a different
> type.__new__ method than object.__new__ so the instantiation syntax
> looks a bit different.

Glad I said it had been a while! :) Maybe I was less confused on the 
Python MOP because I had already done a CL MOP hack?

> 
> 
>>The CLOS MOP is a better playground, but Python has 
>>a clear win in that there is only one Python. If I really need the MOP 
>>for a project, I just pick a CL which exposes it. If I want to deliver a 
>>package any lispnik can use, I better not use the MOP.
> 
> 
> 
> Hear, hear, people who say CL is more standard than Python!

I doubt they say precisely that, if standard means "the same across all 
implementations". :)

What I would say is that CL stands at the end of the long road Python is 
now headed down, with divergent branches (not a problem for Python) 
brought together in a big, stabilizing spec.

Python is more like a volcanic island rising out of the sea, still being 
formed, features still being debated. Heady days, being there at the 
creation. Then again, "may you live in an interesting time" is a Chinese 
curse. :)



-- 

  kenny tilton
  clinisys, inc
  http://www.tilton-technology.com/
  ---------------------------------------------------------------
"Career highlights? I had two. I got an intentional walk from
Sandy Koufax and I got out of a rundown against the Mets."
                                                  -- Bob Uecker





More information about the Python-list mailing list