Re: [Vala] inline C

On Mon, 2008-12-15 at 12:42 -0500, Jamie McCracken wrote:
On Mon, 2008-12-15 at 09:18 -0800, Conrad Steenberg wrote:
On Sat, 2008-12-13 at 13:00 -0500, Jamie McCracken wrote:
The disadvantage to inlining is it destroys the platform independence -
IE you would not be able to create a gcc front end for vala nor would
you be able to have vala->c++ or vala->jvm/clr. 


Hmmm, I would love to be able to use C++ libraries from Vala (or Genie,
since it's a natural jump from Numeric Python which I currently use).

Any ideas on how to do that? Compile the vala/genie-produced C code with
a C++ compiler?

if you want vala to output to c++ objects instead of gobject C then you
would have to code a backend for vala but this is a lot of work 


Yes, I can imagine. I notice that SWIG can now produce C wrappers for C
++ code, so that may be one way to go. In the long term it would be nice
to have a sort of vapi++ to call C++ code, even though GObject is still

Btw. there is a Genie/Python-like language called Wirbel that compiles
directly to C++ - see The
compiler and libraries are GPL, though, so any code it generates has to
be GPL'd too.

Conrad D. Steenberg Ph.D.            conrad steenberg caltech edu
Scientific Software Engineer
Pierce Bio-Engineering Lab           Mail Code 114-96
California Institute of Technology   Pasadena, CA, 91125

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]