Re: Fwd: GTK+ is real object oriented?
- From: frederico schardong <frede sch gmail com>
- To: gtk-list gnome org
- Subject: Re: Fwd: GTK+ is real object oriented?
- Date: Sun, 20 Dec 2009 17:26:20 -0200
Yes, C don't provide sintax support for do my example of method.
In OOP such class must have self methods to set self attributes.
What happen is GObject (by the C limitation) just have attributes, the
methods to set its attributes are functions out of the struct. Ok, is
this what happen, but for this facts don't broke the OOP?
2009/12/20 Michael Torrie <torriem gmail com>:
> frederico schardong wrote:
>> Fake is when change a attribute (visibility) of a class (gtkwidget)
>> only can be changed by a function (gtk_widget_hide() or
>> (gtk_widget_show()) not by a method.
>
> In most languages, methods are functions.
>
> Sounds to me like you are stuck on syntax rather than the real concept.
> You can do object-oriented programming in most any language, whether it
> has syntactical support or not. C++'s objects are really structs with a
> function call table (vtable) tacked on.
>
> You might consider the Vala language, which implements a syntax more
> like what you are expecting. Under the hood, Vala is straight gobject
> (straight-C), so it's very light-weight.
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
--
Thanks,
Frederico Schardong,
SOLIS - Open source solutions
www.solis.coop.br
Linux registered user #500582
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]