The end to all language wars and the great unity API to come!

Gregory Ewing greg.ewing at canterbury.ac.nz
Wed Jul 6 09:05:07 CEST 2011


rantingrick wrote:

> I was thinking more about this comment and it occurred to me that
> Python does have user controlled data structures. Just because there
> is no "top level syntax" like ruby does not mean these do not exists.

Syntax is what it's really about, though. There's no clear
dividing line, but when Guido says he's opposed to "user
defined syntax" he's talking about things like Lisp macros,
which let you effectively extend the grammar with new
keywords and syntactic structures.

Compared to that, Python's grammar is very much fixed.
Anything you want to do has to be done within the existing
framework of function calls, attribute references etc.

If Python truly had user-defined syntax, it wouldn't have
been necessary to modify the compiler to implement features
such as list comprehensions and with-statements -- those
features could have been implemented, with the *same
syntax* or something close to it, in the base language.

-- 
Greg



More information about the Python-list mailing list