A 'Python like' language
michele.simionato at poste.it
Sat Mar 27 13:09:24 CET 2004
"Daniel Ellison" <daniel at syrinx.net> wrote in message news:<c429js$2ddf7r$1 at ID-227230.news.uni-berlin.de>...
> That's what I love about prototype-based languages: they're just so simple.
> Class-based language suffer from the meta-class complication ...
Sorry, but this statement makes no sense. Plenty of class-based languages
(Java, C++, early versions of Python, etc.) do not expose metaclasses to
the user, so there is no metaclass complication. For what concerns languages
that expose metaclasses to the user (such as Smalltalk, Lisp, Python), you
must notice that you are not forced to use metaclasses. Also, it is
unlikely that you will be in the situation of maintaining code using
metaclasses and written by others, so there is no risk your brain will
Metaclasses are intended as a tool for framework designers, not for the
casual programmer. It is true that as time passes they will probably becomes
more popular and more used (as I hope) but still 99% of Python code will
be written without metaclasses.
It makes no sense to say "look, Python was a beatiful and simple language
until a couple of years ago: now they have added metaclasses and it has
become a mess, I must switch to something simpler". All the code you
wrote before metaclasses is still clean, simple and still works!
I don't think Python has become significantly more complex for the
average user (actually I think it has become even simpler); OTOH,
it has become more useful for the sophisticated user.
What I like of Python is its layered structure: it can be used at
many levels and it is as good for the beginner as for the advanced
user. Most other languages are for beginners only or for experts only:
Python is for everybody.
Finally, just to conclude, I don't think metaclasses are that complicated;
they just have a bad reputation ;)
More information about the Python-list