Any advantage in LISPs having simpler grammars than Python?

Grant Edwards grante at visi.com
Tue Mar 7 23:31:38 CET 2006


On 2006-03-07, seberino at spawar.navy.mil <seberino at spawar.navy.mil> wrote:

> Is there any advantage to a language having a nice mathematically
> compact grammar like LISP does? (or at least used to?)

Yes.  Grammars like LISP's make it easy for programs to
generate and read code. Grammars like Python's make it easy for
humans to generate and read code.

> Many have admired the mathematically simple grammar of LISP
> in which much of the language is built up from conses IIRC.
>
> Python's grammar seems complicated by comparison.

People are pretty good at complicated grammars if they're well
designed (people seem to like grammars with a fair bit of
redundancy), and can be amazingly bad at simple grammars.

> Is this anything to worry about?

That depends.  Are you a computer program or a person?  If the
former, LISP is definitely for you.  If the latter, then I'd
recommend Python.

(And I used to write real-world apps in Scheme before I
discovered Python).

-- 
Grant Edwards                   grante             Yow!  I think my CAREER
                                  at               is RUINED!!
                               visi.com            



More information about the Python-list mailing list