Re: C vs C++ for GTK
- From: Benoît Dejean <benoit placenet org>
- To: Dan H <dunno stoptrick com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: C vs C++ for GTK
- Date: Mon, 26 Nov 2007 17:38:13 +0100
Le lundi 26 novembre 2007 Ã 12:04 +0100, Dan H a Ãcrit :
On Sun, 25 Nov 2007 00:03:14 +0100
Tomas Carnecky <tom dbservice com> wrote:
Am I limited with C?
No, there are very few features in C++ that are hard/impossible to
imitate in C, but you usually won't need those for small projects.
In fact the GObject library (on which GTK is based) is an example of
how full object-orientation can be achieved in C. Of course other C++
features like templates, operator overloading (ugh!) and namespaces
are unique.
This is totally a blocker for beginners. I've been doing some GNOME for
years and i've never wrote any gobject thing because it didn't worth to
waste time on it.
If you want to use C++ with GTK you can do so through gtkmm which, if
I'm not mistaken, is essentially a wrapper around the assorted C
libraries. So you end up with two redundant layers of
object-orientation on top of each other which doesn't hurt a bit but
which I find conceptually so abhorrent that, if I'd want to write C++
GUI apps, I'd use Qt.
C is a kind of subset of C++, if you want to use GTK+ from C++, you can
do it exactly the same way.
--
BenoÃt Dejean
GNOME http://www.gnomefr.org/
LibGTop http://directory.fsf.org/libgtop.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]