Re: Haskell: functional languages vs Lisp

From: Don Geddis (don_at_geddis.org)
Date: 05/29/04


Date: Sat, 29 May 2004 05:47:51 GMT

mikel <mikel@evins.net> wrote on Fri, 28 May 2004:
> It so happens that over the past few months I've conducted a sort of informal
> experiment, using Common Lisp, Scheme, and Ocaml to write and rewrite the
> same nontrivial application.
[...]
> I have evolved a process that involves prototyping new features
> in Common Lisp and then delivering them in Ocaml. I find it easier to explore
> the problem space interactively in Lisp, and easier to deliver a program
> whose source is concise, and whose executable is small, simple, and fast in
> Ocaml.

If you've already got a working prototype in Lisp, you've surely attempted
the approach of profiling & optimizing the existing program, while staying
in Lisp.

My intuition is that translating a working Lisp prototype into Ocaml would
be more work than simply optimizing the Lisp code. Yet your experience
suggests that you prefer writing the final version in Ocaml.

Can you explain this in any more detail? What difficulties did you encounter
in trying to optimize the Lisp code for "small, simple, and fast" which led
you to prefer re-writing in Ocaml instead?

        -- Don
_______________________________________________________________________________
Don Geddis http://don.geddis.org/ don@geddis.org
Whenever I see a beautiful swan, gliding along, I think, The world is not so
terrible. But then he ducks his head underwater, with his rear end sticking up
in the air, and I think, Yes, it is.
        -- Deep Thoughts, by Jack Handey [1999]



Relevant Pages

  • Re: Lisp dinamism vs ML safety
    ... living (though I'm rather new to Lisp), I'd like to throw in my three cents ... First off, I must say that I enjoy both OCaml and Lisp, and I think they ... One of the first things I wrote in Lisp was a tree editor, ... of Lisp code into continuation-passing style, ...
    (comp.lang.lisp)
  • Re: Program compression
    ... In Common Lisp it's just one line of code: ... In OCaml with OCaml's notation: ... In Common Lisp, it's another one line of code: ... Consider parsing Mathematica expressions including lists, rules, sums, ...
    (comp.programming)
  • Re: Alternatives 4
    ... This does show something interesting about lisp, ... And the OCaml code demonstrates how other languages can provide both ... performance and brevity at the same time, which is the power of OCaml. ... Emacs is the best there is as far as an IDE for OCaml goes ...
    (comp.lang.lisp)
  • Re: Alternatives 4
    ... performance and brevity at the same time, which is the power of OCaml. ... And the optimized lisp benchmarks twice as fast... ... I do not believe longer identifiers improve clarity at all in such ...
    (comp.lang.lisp)
  • Re: Program compression
    ... Haskell, SML, OCaml, Mathematica, F# and Scala all allow real ... problems to be solved much more concisely than with Lisp. ... for simple lists those three languages equal Lisp in conciseness. ... and thus there's no need for concurrent GC. ...
    (comp.programming)