merits of Lisp vs Python

Jon Harrop jon at ffconsultancy.com
Tue Dec 19 03:29:11 EST 2006


Rob Thorpe wrote:
> Once you can do the above then you can phrase programs entirely in
> terms of composition of functions, which is what functional programming
> is about.

There are many aspects to functional programming. Some languages (like Lisp
and Python) are very impure and hardly encourage functional programming.
Other languages (like OCaml, SML, F# and Scheme) are impure but make
functional programming easy (e.g. higher-order functions, currying,
continuation passing style are all concise and statically checked). Some
languages (like Haskell) are purely functional, so everything must be
immutable.

> Getting good performance though is problematic without being able to
> evaluate parts at compile time.  This is why almost all functional
> languages provide that feature in some form.

Actually the languages that don't provide compile-time execution (OCaml, SML
and F#) are typically much faster than those that do (Lisp, Scheme, Dylan).

-- 
Dr Jon D Harrop, Flying Frog Consultancy
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists/index.html?usenet



More information about the Python-list mailing list