Is classless worth consideration

Donn Cave donn at u.washington.edu
Fri Apr 30 14:00:44 EDT 2004


In article <8ef9bea6.0404292307.66b78b83 at posting.google.com>,
 hungjunglu at yahoo.com (Hung Jung Lu) wrote:
> Peter Hansen <peter at engcorp.com> wrote in message 
> news:<boydnb9qfrqWJQzdRVn-gw at powergate.ca>...
> > has wrote:
> > > Compared to C++, I expect it's a real breath of fresh air. But
> > > compared to how something like Self does OO, it is indeed hideously
> > > baroque.
> > 
> > Oh, now you're qualifying the statement.  In comparison to
> > something less baroque, it's baroque.  Fair enough...
> 
> Good that things cleared up. I have also pointed out previously that
> Python uses 5 devices where prototype-based needs only one: (a) class,
> (b) instance, (c) module, (d) metaclass, (e) scope. If this is not
> hideously baroque, then, Houston, we've got a problem. If you can
> really think outside the box, you'd pitch in also: (f) aspect.

As much as I love simplicity, it seems to me you may be
stretching it here.  I would have to agree with Peter Hansen
that it isn't clear that scope and module would benefit
from collapse into a single concept along with the rest.

For that matter it isn't clear that instance and class
would benefit, but when we get to metaclasses it's harder
to disagree with you.  I think I recall that you have been
arguing that class and instance naturally give rise to
metaclass, and that would be a strong argument.

If it's true - if you really can't write effective,
maintainable programs in Python without metaclass.  To
me that seems like an absurd proposition, though, if only
because I'd have no idea how to use metaclass nor why I
would want to do so.  When the idea showed up a few years
back, everyone chuckled about the `then my head exploded'
experience of wrestling with metaclasses, and I have been
assuming that it was a sort of sport accessory for people
who need a little of that kind of thing now and then.  You
don't think so, it's a basic necessity, programs written
with just class and instance are liable to be ineffective
or unmaintainable or something?

   Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list