From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA27424 for caml-redistribution; Thu, 26 Aug 1999 19:34:42 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id DAA14183 for ; Wed, 25 Aug 1999 03:43:01 +0200 (MET DST) Received: from www.nextsolution.co.jp (www.nextsolution.co.jp [202.33.212.2]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id DAA27140 for ; Wed, 25 Aug 1999 03:42:43 +0200 (MET DST) Received: from sparc1.nextsolution.co.jp (sparc1 [202.235.80.1]) by www.nextsolution.co.jp (8.8.7/3.7W) with SMTP id KAA14911; Wed, 25 Aug 1999 10:40:03 +0900 (JST) Received: from sparc1.nextsolution.co.jp by sparc1.nextsolution.co.jp (SMI-8.6/SMI-SVR4) id KAA01194; Wed, 25 Aug 1999 10:42:04 +0900 From: "Frank A. Christoph" To: "John Skaller" Cc: "OCAML" Subject: RE: convincing management to switch to Ocaml Date: Wed, 25 Aug 1999 10:51:35 +0900 Message-ID: <001801beee9c$5d364860$0150ebca@nextsolution.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 In-Reply-To: <3.0.6.32.19990813203205.00990520@mail.triode.net.au> Importance: Normal Sender: weis 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