Why is Python popular, while Lisp and Scheme aren't?

Martti Halminen martti.halminen at kolumbus.fi
Wed Nov 27 21:22:13 EST 2002


Robin Munn wrote:

> What I'm going off of here is my memory of having to count and re-count
> parentheses as I was writing to make sure that I was putting in the
> right number of closing parens to finish a structure. With
> color-highlighting, I could at least be certain *at a glance* of which
> paren was lining up with which. Yes, I know I could use % in vi, and
> that there is some equivalent function in emacs, but that would be much
> slower than just seeing it.

Whenever I put the cursor next to a closing paren in my emacs, it also
highlights the corresponding opening paren. Have you managed to turn
show-paren-mode off somehow? A more visible version of this happens if
you do (setq show-paren-style 'expression) in your .emacs or the
*scratch* buffer.

> And no, I haven't needed indentation-based highlighting in Python. But
> what I'm talking about isn't really indentation-based, it's
> nesting-level based. And the reason for it is because I still don't
> understand how to indent *properly* in Lisp, and can't find a good
> reference on how to indent properly. Color highlighting would at least
> give me the visual cues I need until I learn to indent.

While there is a relatively standard style in Lisp indentation, it is so
common that most places don't bother to document it :-\

http://www.lisp.org/table/style.htm has a paragraph about it, not very
thorough.

In practice, CL programmers mostly use whatever indentation Emacs does:
the programmer doesn't make indentation decisions, just hits ctrl-j, TAB
or M-x indent-sexp as needed and looks what happens. If the result looks
unexpected (to a practiced eye), then it's time to start checking what
went wrong.
[By the time you start defining your own macros you'll probably want to
modify their indentation, but at that time you're likely familiar with
the style already.]

--



More information about the Python-list mailing list