Re: Fwd: GTK+ is real object oriented?
- From: Michael Torrie <torriem gmail com>
- To: GTK mailing list <gtk-list gnome org>
- Subject: Re: Fwd: GTK+ is real object oriented?
- Date: Mon, 21 Dec 2009 09:26:06 -0700
frederico schardong wrote:
> I like C sintax, but is it that create this confusion to me... Thanks
> for clearly, and I agree that GTK is OO.
Take a look at Vala[1]. I think you'd like it. It compiles to C code,
so there is zero overhead. Vala syntax itself is basically C with
object-oriented syntactical sugar. Most distros have a reasonably
updated version of Vala in their repositories.
Certainly if you want to make your own GTK widgets that derive from
other widgets, or make your own object-oriented, GObject-based code,
Vala is very handy. As OO as GTK is, creating new classes in straight C
is very ugly. Vala-generated code can be used in straight C programs
directly. If you made a new Vala class called "foo," for example, it
automatically provides the C-style methods like:
foo_new()
Vala has an advantage over C++ in that any Vala classes you create can
be used by any of the language bindings (in theory), whereas C++ classes
cannot be used easily by C code.
[1] http://live.gnome.org/Vala
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]