Re: gtk-list Digest, Vol 68, Issue 27



if u think GTK is not a oriented object programming, make it easy, modify the code until it turns OOP,  and with these you'll be helping the comunity to debug the source code, simple. all the other points of view are only attacks and not constructive comments.

ESTE HA SIDO UN MENSAJE DE TU DIOS AMO Y SEÑOR MALLER.
MAS RESPETO HACIA TU DIOS, Y BORRA ESA ESTUPIDA SONRISA DE TU ROSTRO...


2009/12/20 <gtk-list-request gnome org>
Send gtk-list mailing list submissions to
       gtk-list gnome org

To subscribe or unsubscribe via the World Wide Web, visit
       http://mail.gnome.org/mailman/listinfo/gtk-list
or, via email, send a message with subject or body 'help' to
       gtk-list-request gnome org

You can reach the person managing the list at
       gtk-list-owner gnome org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gtk-list digest..."


Today's Topics:

  1. Re: GTK+ is real object oriented? (David Ne?as)
  2. Re: GTK+ is real object oriented? (David Ne?as)
  3. Fwd: GTK+ is real object oriented? (frederico schardong)
  4. Fwd: GTK+ is real object oriented? (frederico schardong)
  5. Fwd: GTK+ is real object oriented? (frederico schardong)
  6. Fwd: GTK+ is real object oriented? (frederico schardong)
  7. Re: Custom container + Child type with interface (David Ne?as)
  8. Re: Fwd: GTK+ is real object oriented? (Matthew Bucknall)


----------------------------------------------------------------------

Message: 1
Date: Sun, 20 Dec 2009 18:37:47 +0100
From: David Ne?as <yeti physics muni cz>
To: frederico schardong <frede sch gmail com>
Cc: gtk-list gnome org
Subject: Re: GTK+ is real object oriented?
Message-ID: <20091220173746 GB8103 physics muni cz>
Content-Type: text/plain; charset=us-ascii

On Sun, Dec 20, 2009 at 03:07:01PM -0200, frederico schardong wrote:
> Is GTK+ really object oriented?
>
> Or just provide a fake object oriented environment?

And what is the difference?

If it walks like an object oriented environment and quacks like an
object oriented environment, how do you call it?

Yeti



------------------------------

Message: 2
Date: Sun, 20 Dec 2009 18:54:07 +0100
From: David Ne?as <yeti physics muni cz>
To: frederico schardong <frede sch gmail com>
Cc: gtk-list gnome org
Subject: Re: GTK+ is real object oriented?
Message-ID: <20091220175407 GC8103 physics muni cz>
Content-Type: text/plain; charset=us-ascii

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



------------------------------

Message: 3
Date: Sun, 20 Dec 2009 16:16:11 -0200
From: frederico schardong <frede sch gmail com>
To: gtk-list gnome org
Subject: Fwd: GTK+ is real object oriented?
Message-ID:
       <c8f238750912201016r15934a82s2169b68b920b6de4 mail gmail com>
Content-Type: text/plain; charset=ISO-8859-1

---------- Forwarded message ----------
From: frederico schardong <frede sch gmail com>
Date: 2009/12/20
Subject: Re: GTK+ is real object oriented?
To: "Michael P. Soulier" <msoulier digitaltorque ca>


Real is when the language have the concepts of ?class, objects,
instance, method, inheritance, abstraction, encapsulation,
polymorphism...

In GTK+ programmin we don't have something like
widget->setVisibility(TRUE). For me it's broken the concept of object
oriented, because a attribute(visibility) of the class widget is set
by a extern function, not a method of the class widget.

2009/12/20 Michael P. Soulier <msoulier digitaltorque ca>:
> On 20/12/09 frederico schardong said:
>
>> Hi,
>>
>> Is GTK+ really object oriented?
>>
>> Or just provide a fake object oriented environment?
>
> Define real. Define fake.
>
> Mike
> --
> Michael P. Soulier <msoulier digitaltorque ca>
> "Any intelligent fool can make things bigger and more complex... It takes a
> touch of genius - and a lot of courage to move in the opposite direction."
> --Albert Einstein
>



--
Thanks,
Frederico Schardong,
SOLIS - Open source solutions
www.solis.coop.br
Linux registered user #500582



--
Thanks,
Frederico Schardong,
SOLIS - Open source solutions
www.solis.coop.br
Linux registered user #500582


------------------------------

Message: 4
Date: Sun, 20 Dec 2009 16:16:32 -0200
From: frederico schardong <frede sch gmail com>
To: gtk-list gnome org
Subject: Fwd: GTK+ is real object oriented?
Message-ID:
       <c8f238750912201016i5f2e1553w14e335d0e1f79380 mail gmail com>
Content-Type: text/plain; charset=ISO-8859-1

---------- Forwarded message ----------
From: frederico schardong <frede sch gmail com>
Date: 2009/12/20
Subject: Re: GTK+ is real object oriented?
To: "Michael P. Soulier" <msoulier digitaltorque ca>


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.

2009/12/20 frederico schardong <frede sch gmail com>:
> Real is when the language have the concepts of ?class, objects,
> instance, method, inheritance, abstraction, encapsulation,
> polymorphism...
>
> In GTK+ programmin we don't have something like
> widget->setVisibility(TRUE). For me it's broken the concept of object
> oriented, because a attribute(visibility) of the class widget is set
> by a extern function, not a method of the class widget.
>
> 2009/12/20 Michael P. Soulier <msoulier digitaltorque ca>:
>> On 20/12/09 frederico schardong said:
>>
>>> Hi,
>>>
>>> Is GTK+ really object oriented?
>>>
>>> Or just provide a fake object oriented environment?
>>
>> Define real. Define fake.
>>
>> Mike
>> --
>> Michael P. Soulier <msoulier digitaltorque ca>
>> "Any intelligent fool can make things bigger and more complex... It takes a
>> touch of genius - and a lot of courage to move in the opposite direction."
>> --Albert Einstein
>>
>
>
>
> --
> Thanks,
> Frederico Schardong,
> SOLIS - Open source solutions
> www.solis.coop.br
> Linux registered user #500582
>



--
Thanks,
Frederico Schardong,
SOLIS - Open source solutions
www.solis.coop.br
Linux registered user #500582



--
Thanks,
Frederico Schardong,
SOLIS - Open source solutions
www.solis.coop.br
Linux registered user #500582


------------------------------

Message: 5
Date: Sun, 20 Dec 2009 16:16:51 -0200
From: frederico schardong <frede sch gmail com>
To: gtk-list gnome org
Subject: Fwd: GTK+ is real object oriented?
Message-ID:
       <c8f238750912201016y66918537i58121434875aefc4 mail gmail com>
Content-Type: text/plain; charset=UTF-8

---------- 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>


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?

2009/12/20 David Ne?as <yeti physics muni cz>:
> On Sun, Dec 20, 2009 at 03:07:01PM -0200, frederico schardong wrote:
>> Is GTK+ really object oriented?
>>
>> Or just provide a fake object oriented environment?
>
> And what is the difference?
>
> If it walks like an object oriented environment and quacks like an
> object oriented environment, how do you call it?
>
> Yeti
>
>



--
Thanks,
Frederico Schardong,
SOLIS - Open source solutions
www.solis.coop.br
Linux registered user #500582



--
Thanks,
Frederico Schardong,
SOLIS - Open source solutions
www.solis.coop.br
Linux registered user #500582


------------------------------

Message: 6
Date: Sun, 20 Dec 2009 16:17:12 -0200
From: frederico schardong <frede sch gmail com>
To: gtk-list gnome org
Subject: Fwd: GTK+ is real object oriented?
Message-ID:
       <c8f238750912201017y7c2b9040p10d55e7228e41154 mail gmail com>
Content-Type: text/plain; charset=UTF-8

---------- 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



--
Thanks,
Frederico Schardong,
SOLIS - Open source solutions
www.solis.coop.br
Linux registered user #500582


------------------------------

Message: 7
Date: Sun, 20 Dec 2009 19:22:20 +0100
From: David Ne?as <yeti physics muni cz>
To: Matthew Bucknall <matt mattbucknall com>
Cc: "gtk-list gnome org" <gtk-list gnome org>
Subject: Re: Custom container + Child type with interface
Message-ID: <20091220182220 GB17795 physics muni cz>
Content-Type: text/plain; charset=us-ascii

On Sun, Dec 20, 2009 at 04:43:57PM +0000, Matthew Bucknall wrote:
> Next question - The interface I have defined basically just mandates a
> few properties. The container that requires children to implement this
> interface only ever reads these properties.
>
> Some implementers of the interface will determine the value of the
> interface properties based on various bits of internal state
> information. Other implementers will be passed the property values via
> their constructors.
>
> So as far as the container and some implementers are concerned, the
> interface properties only need to be G_PARAM_READABLE. In other cases,
> the properties might need to be (G_PARAM_READWRITE |
> G_PARAM_CONSTRUCT_ONLY).
>
> I assume that the interface definition has to go with the lowest common
> denominator, which I think is G_PARAM_READWRITE. In that case, what
> should implementers do where the properties are not settable (because
> they are derived from other state information)?

I've never had to override properties (fortunately), so just some OO
theory...

You do not go with `the least common denominator'.  The is-a relation
between subclases and classes or implementations of interfaces means that
you can always say MyFoo is a GpanePanel if it implements the interface.
In other words, you must be always able to substitute the derived object
for the parent.

You can't do this if the parent has writable properties but the child
has not.

So to mandate the is-a relation in case of your properties, the parent
must have the most *restrictive* flags (typically G_PARAM_READABLE).
Subclasses can then permit more operations.

Regards,

Yeti



------------------------------

Message: 8
Date: Sun, 20 Dec 2009 19:08:31 +0000
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?
Message-ID: <1261336111 28816 86 camel newton>
Content-Type: text/plain; charset="UTF-8"

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
>
>
>




------------------------------

_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list


End of gtk-list Digest, Vol 68, Issue 27
****************************************



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