English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2004-06-06 (16:02)
From: David Fox <david.fox@l...>
Subject: Re: [Caml-list] Efficient C++ interfacing?
skaller wrote:

>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 :)

There's a third obstacle.  Qt code is preprocessed by moc, which adds 
additional unparsable features to the already unparsable C++ syntax.


This message contains information which may be confidential and privileged. Unless you are the 
addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone 
the message or any information contained in the message. If you have received the message in error, 
please advise the sender and delete the message.  Thank you.