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

Martti Halminen martti.halminen at kolumbus.fi
Sat Nov 9 14:21:28 EST 2002


Richard Dillingham wrote:

> > The only thing that could make me at all comfortable with using Lisp
> > would be if I had an editor that would color-highlight not keywords or
> > strings, as color-highlighting usually goes, but levels of parenthesis
> > indentation. So that this:
> >
> > (a (b (c (d e))))

> 
> I wonder why you aren't writing
> (a
>     (b
>         (c
>             (d e)
>         )
>     )
> )


A lisp programmer would write it like this:

(a
 (b
  (c
   (d e))))

or the original: (a (b (c (d e)))) if using so short names and no
control structures causing special indentation.


> The issue with 'Python being easier to read than Lisp,' IMHO, is mainly that
> Python FORCES you to use indentation, whereas Lisp does not.
> 
> Since Lisp does not force you to write readable code, you have to force
> yourself to use indentation.

For a beginner it might be forcing, for the professionals it is a major
tool. Not using the canonical indentation style is a sure sign of a
newbie in comp.lang.lisp.

> But I don't see a bunch of C programmers typing
> if (a) { if (b) { if (c) { asdf; } else { zzzz; }} else { foo; }} else
> {bar;}
> like a Lisp coder might type
> (if (a) (if (b) (if (c) (asdf) (zzzz)) (foo)) (bar))

> (if (a)
>     (if (b)
>         (if (c)
>             (asdf)
>             (zzzz)
>         )
>         (foo)
>     )
>     (bar)
> )
> 

(if (a)
    (if (b)
        (if (c)
            (asdf)
	  (zzzz))	  
      (foo))
  (bar))

Would be the normal way to write this.

--



More information about the Python-list mailing list