I am about to start a new project and I cannot decide if I should pick OCaml or Lisp for the project. My main concern is about the difference of productivity — if any.

I program OCaml since 1998 and, while I neither tried to measure this precisely nor to even define precisely what the productivity I would like to measure is, I am pretty confident that I am more productive with OCaml than I am with more classical languages I know, as C or Python. I think so, because the compiler is so good at catching my errors, that only the smart bugs make it to the final program—but these are usually easy to find, like some logic piece being semi-obviously wrong or system resources inappropriately manipulated. I never invested in learning the debugger of OCaml — which by the way can go backwards in the time—because I had never felt I needed using it. The language has a module system allowing generalisation of structures by means of functors and a preprocessor camlp4 which can be used to extend the language, like implementing automatic serialisation of values.

This is of course something that Lisp has not—but I tried Slime in Emacs, and it looks to include an all-mighty debugger and code explorer. But Lisp has macros.

Unfortunately, my knowledge in Lisp is almost zero—I toyed around with it about one afternoon—and I am therefore unable to compare macros with camlp4. To me, it seems that:

  • Lisp macros are much easier to write than camlp4 extensions.
  • Lisp macros are much easier to use as modules or camlp4 extensions. Functors, when used to implement a functionality similar to traits are quite clumsy, verbose, and require odd-looking idiosyncratic invocations: on the other side, Lisp macros just look like anything else in Lisp (S-expressions).
  • Lisp macros do not raise an engineering problem, they belong to a package, dot. Functors do raise engineering problems because type names receive aliases, which is puzzling.

(As a side note, it looks to me that Lisp is easier to get started with than OCaml is, at least for the bunch of quantum physicists wanting to join the project.)

Can anyone compare the incidence on productivity of OCaml and Lisp (pick the one you want)?

closed as primarily opinion-based by coredump, durron597, user22815, Ixrec, GlenH7 Oct 12 '15 at 21:58

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    I program OCaml since 1998 and... -- That's probably the deciding factor, unless this is a "learn a new language" exercise, or macros are an integral and necessary part of your project. Most of the time, you won't need macros (always prefer higher-order functions instead), unless you want to define language syntax. – Robert Harvey Jan 25 '14 at 3:27
  • @RobertHarvey most of the time, you won't need macros, always prefer higher-order functions — That's quite a fair argument! Macros look like the best available tool when it comes to write data-interfaces (both DB or GUI). But well, that is not all of the program! – user40989 Jan 25 '14 at 10:14