Re: Fwd: GTK+ is real object oriented?
- From: Matthew Bucknall <matt mattbucknall com>
- To: frederico schardong <frede sch gmail com>
- Cc: "gtk-list gnome org" <gtk-list gnome org>
- Subject: Re: Fwd: GTK+ is real object oriented?
- Date: Sun, 20 Dec 2009 19:08:31 +0000
I think you're making way to strong a connection between language syntax
and programming paradigms. You're confusing 'what' with 'how'.
GObject, on which GTK+ is built provides all the key OOP properties and
GTK+ uses them to maximum effect:
Abstraction
Polymorphism
Inheritance
Encapsulation
C was not designed with object-oriented programming in-mind, so of
course the way GObject goes about presenting the above characteristics
in a C API may be a little awkward compared to how they are realized in
other languages. That does not detract from the fact that GObject/GTK+
provides a 'real' object-oriented environment. It just means it does so
in a way with which you might not be comfortable.
Seems to me, if you want to stick with a compiled language, you might be
better off using C++ and programming GTK+ applications via the gtkmm C++
bindings (http://www.gtkmm.org/).
Matt.
On Sun, 2009-12-20 at 16:17 -0200, frederico schardong wrote:
> ---------- Forwarded message ----------
> From: frederico schardong <frede sch gmail com>
> Date: 2009/12/20
> Subject: Re: GTK+ is real object oriented?
> To: David Nečas <yeti physics muni cz>
>
>
> Maybe I had expressed wrong.
>
> I don't wanna say that GTK+ NOT IS OO, I'm saying that the way that
> GTK+ implements the concepts of OO is different. As I say before...
> "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".
>
> Yes, GTK+ has been construct around OO concepts, buts it have all
> those concepts that a say before (class, objects,
> instance, method, inheritance, abstraction, encapsulation, polymorphism)?
>
> Because this things a say that's fake (maybe not the correct word).
>
> 2009/12/20 David Nečas <yeti physics muni cz>:
> > On Sun, Dec 20, 2009 at 03:40:34PM -0200, frederico schardong wrote:
> >> The difference is that not a really object-oriented, is a fake object-oriented.
> >>
> >> I call it fake object-oriented environment, maybe not the most
> >> correctly name, but i think is true.
> >>
> >> What do you think?
> >
> > I think you still did not give any definition of what real and fake
> > means. At least for you since others will likely disagree whatever the
> > definition is.
> >
> > So again, it is built around OO concepts and behaves like an OO
> > environment. How can you tell it is a fake?
> >
> > Yeti
> >
> >
>
>
>
> --
> 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]