Version française
Home     About     Download     Resources     Contact us    
Browse thread
RE: ocaml needs users: native code for windows?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Carsten Clasohm <clasohm@r...>
Subject: RE: ocaml needs users: native code for windows?
> 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.


Carsten