merits of Lisp vs Python

josephoswaldgg@hotmail.com josephoswald at gmail.com
Thu Dec 14 05:05:08 EST 2006


Neil Cerutti wrote:
> On 2006-12-13, josephoswaldgg at hotmail.com
> <josephoswald at gmail.com> wrote:
> > Try reading again. In Lisp, you use () and *your editor*
> > automatically indents according to the universal standard, or
> > you leave it sloppy until other folks reading your code
> > convince you to get a proper programming editor. Indentation
> > does not get out of sync with semantics because the editor
> > virtually never misses parentheses that the Lisp compiler sees.
> > Expressions keep the same meaning even if you have to start
> > breaking them across lines, etc.
>
> Yes, it's the same way in Python. Of course, not everything is an
> expression in Python, so it's not saying quite as much.

I fail to see how it is the same in Python. I go into a Lisp buffer
white-space area, and press <Tab> and absolutely nothing changes about
my program. There are two reasons for this: I am using a dumb editor
that puts a Tab in that my compiler doesn't care about, or I am using
the moral equivalent of Emacs, which reads <Tab> as "put this line on
the standard Lisp indentation level, as determined by the
non-whitespace characters in the area."

In Python, I hit that <Tab> and the smartest editor in the world would
have to say "Oh, you want to put this line on a different indentation
level, possibly including this line as part of the if: consequences
block above. Hope that helps!"

> > In Python, you group in your mind, and press indentation keys
> > to make it happen in your editor. The editor cannot help that
> > much, because it cannot read your mind. White space screwups in
> > copy-paste cannot be fixed by the editor automatically, because
> > it cannot read the original programmer's mind, and you have to
> > fix it manually, and risk screwing it up.
>
> It is very easy a manual process, possibly as simple as selecting
> the correct s-expr and pasting it into the right place in your
> code.

How does a manual correction process come out as simple as "don't
bother fixing the indentation if you don't care."?

This is exactly the questionable math that I was questioning in the
original post.




More information about the Python-list mailing list