merits of Lisp vs Python

Jon Harrop jon at ffconsultancy.com
Sun Dec 10 04:19:02 EST 2006


Paul Rubin wrote:
> Haskell is pretty neat in that it basically removes things like setq.
> That makes possible (for example) very cool simplifications to
> concurrent programming.  See the paper "Composable memory transactions":
> 
>   http://research.microsoft.com/~simonpj/papers/stm/index.htm
> 
> Yeah you could do that with Lisp by writing in a restricted style,
> just like you could avoid pointer errors in C++ by writing in a
> restricted style.  But it's hard for the compiler to guarantee that
> your program obeys the restrictions.  You could write a language like
> Ada or Java that makes a lot of guarantees, but is unexpressive and a
> huge pain to program in.  You can write a language like Lisp that's
> expressive but doesn't make as many guarantees.  Interesting problems
> in language design arise in writing languages that are expressive AND
> make guarantees.

I discovered this recently with F#. Although F# (as a dialect of OCaml) is
impure like Lisp, it does make purely functional programming easy and
provides many purely functional data structures. I translated 15kLOC of
mostly-functional OCaml code into F# and only had to add four locks to make
the whole library concurrent.

That is probably feasible in Lisp but not in Python...

-- 
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