Re: [gtk-list] Re: I want to understand



Ionutz Borcoman <borco@borco-ei.eng.hokudai.ac.jp> wrote,

> Robert_Gasch/PeopleSoft@peoplesoft.com wrote:
> > 
> > 4) Using C++ as the base would make other language bindings more difficult
> > to write (??)
> C++ mangles names in the object code generated, while C not. I have
> understood that this is the reason why bindings to C code is simpler to
> made. Somebody please correct me if I'm wrong.

Basically, every language has a foreign language interface
to C, very few (does any?) have one to C++.  Moreover, for a
language binding it is not sufficient to just call some
external functions.  You have to convert data values from
the representation of one language to the other, you have to
get memory allocation and deallocation right, and so on.
All this is a pain when binding to C, but I wouldn't even
think about it for C++.

(If you didn't guess it yet, I am writing a language binding 
for GTK+ -- for Haskell <http://haskell.org>.)

Manuel



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