Python becoming less Lisp-like

news.sydney.pipenetworks.com nytimes at swiftdsl.com.au
Tue Mar 15 22:45:04 EST 2005


Torsten Bronger wrote:
> 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.

In that case I wouldn't worry about the magic which can be done in 
python but the magic which can be done in C (which many modules are 
written in). Sometimes I think people complain just to complain.

> I know that such magic is inavoidable with dynamic languages, but

There's always a 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).

Have you heard of java ? maybe you'll like groovy.

> 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).

Now you're talking about extremes

Huy



More information about the Python-list mailing list