Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Efficient C++ interfacing?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] Efficient C++ interfacing?
On Sun, 2004-06-06 at 13:33, John Goerzen wrote:
> On Sun, Jun 06, 2004 at 03:31:04AM +0300, Eray Ozkural wrote:
> > Skaller, as a KDE developer I beg you. Please do it for Qt and KDE as well.
> 
> The other nice thing is this: if we get Qt bindings, then OCaml
> suddenly becomes a viable language for developing embedded
> applications thanks to Qt/Embedded.  That would be excellent.

Well, there are two obstacles at the moment:

(1) Flxcc can't parse C++ yet
(2) Flxcc can't target Ocaml yet

Parsing C++ - templates is quite easy:
I've already made the mods to Frontc parser.
However, the parse tree is processed by Cil,
which does some complex transformations to regularise
the representation, and modifying that isn't so easy.
Cil handles the whole of C, whereas we actually only need
to process interfaces -- expressions could be useful
(default arguments, template arguments, and typeof)

Generating Ocaml should be easy. However the program
will need to be factored to have a selectable backend.
It will need to do a bit more work than the Felix
backend however: Ocaml has separate compilation, 
Felix doesn't. Ocaml can't do general recursion,
Felix has trouble doing anything else.

But I have no doubt it can be done, even if the
result isn't perfect. 

What's needed is developers.
Wrapper generators need extensive testing by experts in 
the wrapped libraries, and the code has to be lifted
out of Felix and put into a new project (and then
Felix will have to re-integrate it).

I guess we need 4 developers to start off.
And a better name than 'flxcc' before registering
a new project :)

-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net



-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners