RE: convincing management to switch to Ocaml

From: Frank A. Christoph (
Date: Wed Aug 25 1999 - 03:51:35 MET DST

From: "Frank A. Christoph" <>
To: "John Skaller" <>
Subject: RE: convincing management to switch to Ocaml
Date: Wed, 25 Aug 1999 10:51:35 +0900
In-Reply-To: <>

John Skaller wrote:
> C++ on the other hand has much to recommend it:
> widely used, ISO Standardised, C compatible, and designed
> not to compromise efficiency. And a huge number of books
> published on it.
> OTOH, ocaml has a number of problems compared with C++:
> it doesn't support separate compilation properly (mutually
> recursive calls don't work), it has bugs, there is no
> readable reference (in English) -- the language reference is good,
> but it is for experts, the tutorial is good, but it is for
> beginners .. and currenly, I'm in the middle.

This is a very one-sided perspective. Anyone on this list can name twenty
signifiicant things that C++ lacks and Ocaml possesses. For example, type
safety, parametric polymorphism, type inference, modules, module signatures,
functors, higher-order functions, higher-order functors, garbage collection,
tail recursion, a top-level.

More generally, I think the balance that Ocaml strikes between efficiency,
and {safety, simplicity, clarity, conciseness} is much better than C++'s.
C++ is very efficient, but very unsafe, very complex, rather unclear (I'm
thinking of coercions and dynamic dispatch) and very long-winded. On the
other hand, Ocaml is fairly efficient, very safe and quite simple, clear and

Separate compilation: Considering C++ programs hardly ever employ recursion,
this is not a very convincing criticism. Anyway, mutual recursion across
module boundaries is methodologically questionable, and not that often

Bugs: I've found the Ocaml implementation to be more bug-free than many
extant C++ compilers. Undoubtedly this is largely due to the fact that C++
is so complex that few people know what its semantics are supposed to be.
Anyway, whenever I have encountered a bug, I've found that bug reports are
answered swiftly and satisfactorily within a day or two.

Lack of a reference: Is this really a fair criticism? C++ is practically an
industry in itself. No reason to indict the Ocaml team just because they
spend most of their team working on the language rather than marketing it.

Lack of ISO standardization: Who cares? Ocaml runs on many platforms despite
this, it's faster than practically all comparable language implementations,
bug reports are always promptly addressed, and new versions are regularly

I don't think it is logical to criticize a _language_ for not being widely
used, not having third-party publications, or lacking ISO standardization.
That sounds more like a criticism of language _users_. :)


This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:24 MET