RE: ocaml needs users: native code for windows?

From: Carsten Clasohm (
Date: Mon May 12 1997 - 10:20:37 MET DST

From: Carsten Clasohm <>
To: "'Lyn A Headley'" <>,
Subject: RE: ocaml needs users: native code for windows?
Date: Mon, 12 May 1997 10:20:37 +0200

> Given those goals, it seems that one step in the right
> direction would involve porting ocamlopt to Intel Win32 and binding
> the frightful but popular Windows API to it, thus allowing people to
> produce Windows binaries without leaving the comforts of ocaml.

I use OCaml for a commercial Win32 project and am quite happy with the
current integration of C(++) and OCaml. The GUI tasks in the program are
carried out by C++ classes, while the 'real' computations are done by
OCaml code.

IMHO it's best to implement the GUI part with C++ and the Microsoft
Foundation Classes (MFC). That's because

1. Microsoft VisualC++ offers a useable set of tools for designing the
GUI and linking code to it.
2. The Win32 API is encapsulated by an extensive class hierarchy (the
MFC) that offers a good representation of the GUI.
3. The GUI code's complexity is relatively low, i.e. I'm comfortable
doing it using C++.
4. Interfacing C++ and OCaml is quite easy if one uses C++ classes that
encapsulate the OCaml values and functions.

> Does anyone else think this is a goal worth pursuing?

Porting the MFC might be worth it. But then, it's a lot of work and I
don't think it would generate enough benefits.


This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:10 MET