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

Patrick W patrickw106 at yahoo.com.au
Wed Nov 20 18:50:05 EST 2002


Alexander Schmolck <a.schmolck at gmx.net> writes:

> 2. try to write something in 1-100 lines in CL that couldn't easier be
>    written in e.g. python.

Lots of things are easier in CL.
A simple example:

(defclass thing () ())
(defclass paper (thing) ())
(defclass rock (thing) ())
(defclass scissors (thing) ())

(defgeneric beats? (thing thing))
(defmethod beats? ((x thing) (y thing)) nil)
(defmethod beats? ((x paper) (y rock)) t)
(defmethod beats? ((x rock) (y scissors)) t)
(defmethod beats? ((x scissors) (y paper)) t)




More information about the Python-list mailing list