PEP318

Michael J. Fromberger Michael.J.Fromberger at Clothing.Dartmouth.EDU
Fri Aug 13 00:36:56 EDT 2004


In article <eppstein-09AC84.10350212082004 at news.service.uci.edu>,
 David Eppstein <eppstein at ics.uci.edu> wrote:
> 
> Also, it's not in the Zen of Python, but maybe declarative is better 
> than imperative?

This one comment particularly caught my attention.  

I generally agree with your above statement, but I don't think that this 
alone really justifies the proposed "decorators" (leaving aside the fact 
that they are still a moving target, semantically).

The basic idea behind PEP-318 wasn't too bad, in my opinion -- but I 
think in discussion it's been overloaded with a lot of declaration work 
that would be better off factored out over other parts of the language 
(e.g., type declarations in the parameter list; method transformations 
wherever the syntactic dust settles over PEP-318; documentary metadata 
preferably left out of the syntax and parsed from comments or doc 
strings).

To use the example of list comprehensions, I think we can agree that 
declarative constructs have excellent potential.  But this is Python, 
not Perl, we don't need to make a Swiss Army knife out of this one piece 
of syntax.  I realize you're not proposing we do so -- but, "declarative 
is better than imperative" could be taken too far by others.

-M

-- 
Michael J. Fromberger             | Lecturer, Dept. of Computer Science
http://www.dartmouth.edu/~sting/  | Dartmouth College, Hanover, NH, USA



More information about the Python-list mailing list