Re: [gtkmm] Probably a stupid Gtk+ question



On 9 Jan, 2004, at 6:50, Carl Nygard wrote:



Like I said, this is probably stupid.  I've had this question rattling
around in my skull for a while, and instead of actually researching it,
I'm taking the easy way out and just asking:

If Gtk+ is built on an object model, why did those folks go to such
(rumored to be) herculean lengths to build one in C, instead of just
using C++?  I can think perhaps language bindings had something to do,
but the only problem that jumps out there would be scheme/lisp binding.
Perl/python/ruby are already OO themselves.

I'm sure theres a good reason, just curious... and not looking to start
a language war.

C++ has a history of particularly poor support on Linux. C has been the favored language for development on Linux for a long time. g++ had poor support for STL and has always been rather slow to compile C++. Not to mention the fact that ABI compatibility was broken with every g++ release and that different architectures supported different parts of STL!

So basically, when Gtk+ started, C++ was a rather poor choice if you wanted to build a well-supported cross-architecture library. And yes, language bindings are another part of the argument. Supposedly it's much easier to make language bindings to various other languages if the core library is in C than if it were in C++. Also, a lot of the Gtk+ and/or Gnome developers feel that C++ is a crummy language and it makes more sense to build the OO features they need into C. Or something like that.

Julian




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