Python becoming less Lisp-like

Torsten Bronger bronger at physik.rwth-aachen.de
Tue Mar 15 06:45:30 EST 2005


Hallöchen!

paul at boddie.org.uk (Paul Boddie) writes:

> Torsten Bronger <bronger at physik.rwth-aachen.de> wrote:
>
>> At first, I was very pleased by Python's syntax (and still I am).
>> Then, after two weeks, I learned about descriptors and
>> metaclasses and such and understood nothing (for the first time
>> in syntax I felt totally lost).
>
> Well, I've been using Python for almost ten years, and I've
> managed to deliberately ignore descriptors and metaclasses quite
> successfully. I get the impression that descriptors in particular
> are a detail of the low-level implementation that get a
> disproportionate level of coverage because of the "hack value"
> they can provide (albeit with seemingly inappropriate application
> to certain problem areas).

I have exactly the same impression, but for me it's the reason why I
feel uncomfortable with them.  For example, I fear that a skilled
package writer could create a module with surprising behaviour by
using the magic of these constructs.  I don't know Python well
enough to get more specific, but flexibility almost always make
confusing situations for non-hackers possible.

I know that such magic is inavoidable with dynamic languages, but
descriptors will be used almost exclusively for properties, and
therefore I think it would have been better to hard-wire properties
in the interpreter rather than pollute the language with this sort
of proto-properties (aka descriptors).

TeX is extremely dynamic.  It can modify its own scanner in order to
become an XML parser or AFM (Adobe font metrics) reader.  This is
highly confusing for all but those five or six people on this planet
who speak TeX fluently.  Since I saw raw TeX, I dislike
"proto-syntaxes" (or meta-syntaxes if you wish).

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus



More information about the Python-list mailing list