Version française
Home     About     Download     Resources     Contact us    
Browse thread
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
> 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