Any advantage in LISPs having simpler grammars than Python?

Ralf Muschall ralf at tecont.de
Wed Mar 8 15:39:21 EST 2006


Douglas Alan wrote:

> Experienced Lisp programmers use indentation to visually parse the
> program structure, just like Python programmers do for Python.
> Experienced Lisp programmers learn to not see the parentheses when
> they don't need to.

True, and this is IMHO an advantage of lisp to python (both humans
and computers get something they are good at parsing, and mistakes
in the one can be corrected using the other).

> When I did a lot of Lisp programming, I often felt that it would be
> kind of nice to have a version of Lisp that would infer many of the
> parentheses from indentation, so that you could elide most of them.

This is not necessary - just making them barely visible suffices.

(font-lock-add-keywords
 'emacs-lisp-mode
 '(("[()]" . somr-barely-visible-face)))

One can also use nil instead of the mode, wrap the thing into a
defun and use it as a hook (nil means "just the current buffer
whatever mode it is in").

Btw., vim seems to try to become a real editor - look at
http://wiki.alu.org/Vim_ECL

Ralf



More information about the Python-list mailing list