Why aren't we all speaking LISP now?

dubba Max.Haas at unibas.ch
Sat May 12 16:30:42 EDT 2001


Steven D. Majewski wrote:

> 
> But STILL, there's some way in which programming in Python and 
> programming in Lisp "feel" similar. I'm not sure if there's any
> more to it than the dynamic and interactive nature and style. 

May it be that you "feel" similar because of map, reduce, lambda and apply?

and Courageous wrote:

> The majority of Lisp programs I've seen are dominated by map/
> lambda forms, basic OOP with multimethod dispatch, heavy use
> of multiple inheritance in mixin-style programming, and so forth.
> The s-expression is exploited in a variety of ways. Hash tables
> are used frequently. Lists are often abused, where other containers
> would be better choices.

Perhaps those interested in very good written Lisp (Common Lisp) could 
have a look at:

- Peter Norvig, Artificial Intelligence Programming. Case Studies in 
Common Lisp (Morgan Kaufmann).

Norvig gives pp. 18-22 an intro into higher-order functions (fcns like 
apply, map etc.) so it's somewhat easy to compare this part to Python. 
(Although he doesn't tackle here all the "map"-possibilities other than 
mapcar: map,mapc, mapcan, mapcon, maphash, mapl, maplist). And then he 
gives little programs which are rewritten in the course of the book to 
show how to get most of it in Common Lisp (e.g. three version of a fcn 
flatten).

Others may feel more interested in

- Paul Graham, Advanced Techniques for Common Lisp (Prentice Hall).

Graham gives here _the_ intro into macros in Common Lisp.

Regards

Max





More information about the Python-list mailing list