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
[Caml-list] RE: OCaml on CLR/JVM?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Don Syme <dsyme@m...>
Subject: [Caml-list] RE: OCaml on CLR/JVM?

Hi Fabrice,

I will attempt to answer your questions without becoming involved in a flame
war.  Please let me start by saying that I believe that OCaml is a fantastic
language and has a good chance of becoming a very significant (even the
leading) programming language amongst the open source community.  And being
an OCaml fan I think this would be a great thing.

> Is the .NET VM open source ? Which part is Microsoft-independent ?

The MS implementation of the Common Language Runtime is not open source.
The Common Language Runtime, C# and aspects of the .NET Frameworks are being
standardized by ECMA.  If the standardization committees do their job, the
standards will be sufficient to allow others to implement a compatible CLR.

> Ocaml is not a _hack_, as I have read in some recent mails, but a
> _good_ independent language.

I did not call OCaml a hack - and I never would!!  Please read my email
again.  I was referring to existing extensions to ML and other languages for
JVM or .NET interoperability (and I even regret saying that, as I only
wished to imply that syntactically they felt "added on" to the language,
which is hardly surprising at all).  OCaml itself is a wonderful, elegant

I have to add that the OCaml backends are wonderful, and I know it would be
hard to produce a CLR-based backend that could really be as fast for
existing OCaml programs.  So I would not suggest that OCaml switch to using
the CLR as its primary backend.   However there are problems with the
existing backend, the complexity of implementing interoperability being one
of them.

> It should not change to follow a
> commercial standart, which will itself change for commercial
> reasons, as soon as the market is captured ...

No one has suggested changing OCaml.  Of course, balancing the "purity" of a
language against interoperability requirements is always difficult, and, for
example, I wouldn't be surprised if proposals appear from Xavier's work to
help ease the complexity of writing code to interoperate.  The would, I'm
sure, be tools and/or extensions and not breaking changes.

> If Microsoft wants its new product to be used, it is Microsoft problem
> to port more languages to its VM, and not only say: "We have ported
> our homemade languages to it (C#, C++, VB.NET) [because it was
> designed for them], so, you see, we have proved it's the universal
> VM. Now, do the same for your languages, or your language will not be
> used anymore by our customers..."

You'll be glad to know that MS and Microsoft Research has been doing what
you say for the last two years and has been porting difficult research
languages (e.g. ML and Haskell) to the CLR, and working with other academic
groups to help this kind of effort move beyond the "hack it up and get it
working" phase that characterises efforts to target langauges at new
platforms.  This has led to many improvements to the CLR, including a
proposal for the CLR to support polymorphism in the next release in order to
better support languages such as OCaml.

> So, why do we really need a .NET port of OCaml ? OCaml is
> working fine on
> Windows, and on many other OS ...

To me, this thread is about how to access JVM and .NET libraries from OCaml,
which many perceive as a real and substantial problem.  Compiling down to
MS-IL is one way to achieve this relatively easily for .NET libraries - as
Xavier says it is neither necessary nor sufficient to do this, but it sure
makes interoperability far, far easier to implement.  I have been careful to
point out it is not the only way - for example Xavier's multi-garbage
collector approach also makes a lot of sense in many situations.

I hope this answers your questions (though I'm sure it won't change your

Don Syme
Microsoft Research, Cambridge
To unsubscribe, mail  Archives: