Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
about OcamIL
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-05-15 (13:23)
From: Goswin von Brederlow <goswin-v-b@w...>
Subject: Re: [Caml-list] about OcamIL
ben kuin <> writes:

> hi erik,
> I highly appreciate your blog, so it hurts me a little but - I disagree:
>> The only evidence to support this is the widespead usage of
>> Java and C#, but I think that is a language choice rather than
>> a conscious decision to use a language that runs on a VM.
>> People chose Java and C# because they are preferable to
>> fundamentally unsafe langauges like C and C++.
> English is not my first language, maybe I misunderstand, but what
> you're are saying here sound like a complete contradiction to me:
> Like you say C and C++ are considered as 'unsafe' languages. But thats
> because they offer features, that are not available when programming
> for a vm. This has nothing to do with languages, it's a conscious
> platform decision.

Who says they are not available in a vm? There is nothing stopping you
from compiling C code to run on a vm. It will be just as unsafe and
crash in the vm as it is on a real cpu.

Similary ocaml can be run in a vm or native. Why would the quality be
improved by running it in a vm? Both bytecode and native use the same
source (unless you mean things like --unsafe).

>>> What if ocamlopt would be dropped for a faster ocaml vm?
>> Why? Even if the Ocaml was able to target a faster VM, there
>> are still many people who would chose to generate native
>> binaries.
> I'd call that a questionable decision. As far as I know, using native
> binaries means to open a whole range of potentially uncorrectionable
> problems with abi incomptabilities between libraries or with changes
> of the underlying os.
> As far as I know when you go native you always have to take abi
> incompatibility and therefore recompilation into account. For business
> apps, that's a showstopper.

Has the native ABI ever changed in ocaml native code? I somewhat doubt
that. That is just the C ABI. The compiled module interface though
changes with every compiler version and every source change it seems. So
every time you update the compiler or change a module you need to
recompile everything.

But that is a problem of the specific ocaml implementation and in no way
a general problem.

And correct me if I'm wrong but don't you have to recompile bytecode
just as well every time you update the compiler?

>> Erik (who uses Ocaml compiled to native binaries for mission
>> critical code)
> Would you mind to share some infos about your experiences, maybe on your blog?