Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: convincing management to switch to Ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Frank A. Christoph <christo@n...>
Subject: RE: convincing management to switch to Ocaml
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
concise.

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

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

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_. :)

--FC