Abstract and concrete syntax
Terry Reedy
tjreedy at udel.edu
Thu Jun 9 12:08:18 EDT 2005
"David Baelde" <david.baelde at ens-lyon.fr> wrote in message
news:pan.2005.06.09.10.58.11.232401 at ens-lyon.fr...
>
> Well, thanks for the answers. I guess the fact is that python does not
> want to be a functional programming language.
Correct. Python is a procedural, functional, OO language.
> I agree that statements as expressions could allow obscure code.
Guido considered (and, I presume, still considers) the distinction between
statement and expression to be a feature, not a wart. Most Python
functions do things that in Lisp require 'special forms' (or builtin
macros, or whatever, in a particular version) with special quoting rules.
For instance, if assignment were done in an expression, the targets would
have to be quoted to avoid having them evaluated. Or the assignment
expression would have to be a 'special expression' that did not evaluate
all its terms (like setq in some (just older?) lisps). In Python, that
'special expression', with its 'quote, don't evaluate, targets' rule, is a
statement!
>The design of programming languages is a complicated thing...
To make everything hang together, yes.
Terry J. Reedy
More information about the Python-list
mailing list