From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id B5288BC88 for ; Sat, 5 Feb 2005 03:04:45 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j1524jVO012790 for ; Sat, 5 Feb 2005 03:04:45 +0100 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 DAA21524 for ; Sat, 5 Feb 2005 03:04:44 +0100 (MET) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j1524gBJ012785 for ; Sat, 5 Feb 2005 03:04:43 +0100 Received: from [192.168.1.200] (ppp212-197.lns2.syd3.internode.on.net [203.122.212.197]) by smtp1.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id j1524Zh5030409; Sat, 5 Feb 2005 12:34:36 +1030 (CST) Subject: Re: [Caml-list] Estimating the size of the ocaml community From: skaller Reply-To: skaller@users.sourceforge.net To: Oliver Bandel Cc: caml-list In-Reply-To: <20050204161250.GF498@first.in-berlin.de> References: <891bd33905020213315a2ebb18@mail.gmail.com> <8008871f05020213362d21ba87@mail.gmail.com> <000f01c50971$baad4840$0100a8c0@mshome.net> <1107403128.32586.223.camel@pelican.wigram> <20050203173556.4acec1c5.ocaml-erikd@mega-nerd.com> <1107461173.14589.91.camel@pelican.wigram> <20050204161250.GF498@first.in-berlin.de> Content-Type: text/plain Message-Id: <1107569074.14589.465.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 05 Feb 2005 13:04:35 +1100 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 420429BD.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 420429BA.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 sourceforge:01 oliver:01 bandel:01 wrote:01 interfacing:01 trivial:01 trivial:01 ocaml:01 extern:01 interfacing:01 parser:01 parsers:01 parser:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Sat, 2005-02-05 at 03:12, Oliver Bandel wrote: > > > > (a) interfacing to C isn't trivial > [...] > > Well, compared to Perl, this task IS trivial in OCaml. But it is very difficult compared to C++, where basically you can just write extern "C" { .. } or Felix where you bascially just write sin: double -> double; to interface the 'sin' function. In Ocaml, the Ocaml code is just like that too, but you have to write wrapper glue (in Felix you don't usually), and the glue goes in another file and is written in C not Ocaml. All of this makes 'trivial' interfacing rather cumbersome, and 'extensive' interfacing a lot of work. So this is a downside whose impact depends on how much C code you need for your application. Typically with Ocaml, a lot of C libraries are a waste of time, since you can do the same code in Ocaml quite easily. EG why bother with a lame XML parser library done for C .. when Ocaml is so good at parsers anyhow, it is probably easier to write your own XML parser in Ocaml than bother interfacing to a C library -- besides which you'd want to think about making your application much simpler using (C/X)Duce anyhow .. :) Nevertheless a large issue in *adopting* a new language is how to handle migration and with an existing large code base binding to C is a real industrial issue. The problem is that for small apps, where a complete rewrite in Ocaml makes sense, there's no great incentive to use a better language. It is only for large scale applications where the superiority of strong typing, GC, HOFs etc etc really count that you'd consider a complete technology change and it is precisely in those cases that migration paths do matter. Catch 22 :) -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net