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 QAA14297 for caml-redistribution; Thu, 12 Aug 1999 16:52:03 +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 OAA14358 for ; Thu, 12 Aug 1999 14:07:02 +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 OAA19503 for ; Thu, 12 Aug 1999 14:06:59 +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 VAA26930; Thu, 12 Aug 1999 21:04:44 +0900 (JST) Received: from sparc1.nextsolution.co.jp by sparc1.nextsolution.co.jp (SMI-8.6/SMI-SVR4) id VAA11182; Thu, 12 Aug 1999 21:06:39 +0900 From: "Frank A. Christoph" To: "STARYNKEVITCH Basile" , Subject: RE: convincing management to switch to Ocaml Date: Thu, 12 Aug 1999 21:15:47 +0900 Message-ID: <000a01bee4bc$68ccf640$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 In-reply-to: <14239.6150.864319.797849@gargle.gargle.HOWL> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Importance: Normal Sender: weis > Does any one have clues or positive experience about convincing > management to switch to Ocaml? > > I'm working for an European Community ESPRIT project [TWO] for static > code analysis -with testing in mind- using abstract interpretation > techniques. > > But I failed to convince my management to switch to a good language > such as Ocaml. I think you should take a look at the following articles by Phil Wadler: "Functional Programming: Why no one uses functional languages" "Functional Programming: An angry half-dozen" Both are available from his home page http://cm.bell-labs.com/cm/cs/who/wadler/ under "recent publications" http://cm.bell-labs.com/cm/cs/who/wadler/topics/recent.html > ================ > > My manager's arguments are: > > * There is an existing (important) code base (a static C code > analyser) coded in C and C++ and it is unreasonable to recode it. I bet there have been more static analyzers and abstract interpretation programs written in functional languages than in C. > * Ocaml is an academic langage Is that relevant? Is code analysis really a peculiarly industrial technique....? > * Ocaml is a slow implentation Yes, since it is the _only_ implementation, it is definitely the slowest implementation of Ocaml. :) On the other hand, it is the fastest functional language I know. > * Ocaml is hard to learn for people (fluent in C++) with less than a PhD > in computer science (unfortunately for me, I do hold a PhD in > Artif. Intel.) (You have my condolences. :) I frequently see people argue that functional languages are too hard to understand and use, and that you have to be a guru programmer to use them. I am fluent in C++ and I use functional languages because they are easier to use than conventional languages. I don't consider myself an especially good programmer, so I need as much help from the programming system as I can get. Conventional languages shift all the burden onto the user (= the programmer): without garbage collection, he has to do the memory management; without parametric polymorphism, he has to remember which type to cast a pointer back to; without higher-order functions, he has to duplicate code and remember to maintain both versions; without type safety, he has to code defensively and there is a greater cognitive burden in general. The user has to do all this stuff, so compiling the language itself is easy because, if it runs, it's pretty much guaranteed to run fast. With typed functional languages, the burden is on the compiler and the implementors. The language is more expressive and declarative, so the programmer is freer to concentrate on the problem at hand. Let the implementor figure out how to compile it well; as a programmer I want _less_ things to worry about. Maybe if I was Linus Torvalds or Xavier Leroy :) or some other world-class programmer, I would be using C or C++. It's partly because I'm _not_ that I like to use functional languages. --FC