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

Erik Max Francis max at alcyone.com
Wed Nov 13 18:30:23 EST 2002


Terry Reedy wrote:

> Thanks.  I'll learn a few things from this. However, apropos to the
> thread topic, I am somewhat flabbergasted that anyone could think that
> Scheme's
> 
>    (sort (cons 1297.04 (cons 20000.00 (cons -505.25 empty))))
>    ;; expected value:
>    (cons 20000.00 (cons 1297.04 (cons -505.25 empty)))
> 
> (section 12.2) is a sensible list notation to inflict on anyone, let
> alone newcomers, in preference to anything like Python's [1297.04,
> 2000.00, -505.25], etc.  I understand that there is a pedagogical
> point in using such notation to explain list construction and
> destruction, but the above comes well beyond that part ot the book.

This is just demonstrating how to build up lists from cons cells; in
that respect, it is no different from other Lisps (although in Common
Lisp the empty would be replaced by nil).  There are other, more
convenient ways to build lists, e.g.

	(list 1297.04 20000.00 -505.25)
	'(1297.04 20000.00 -505.25)

The example above is just demonstrating that lists are built from cons
cells and (probably) hinting at the fact that more lower level data
structuring can be done with cons cells, and lists are only one
(degenerate) application.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ Experience is the name everyone gives to their mistakes.
\__/ Oscar Wilde
    WebVal / http://www.alcyone.com/pyos/webval/
 URL scanner, maintainer, and validator in Python.



More information about the Python-list mailing list