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

Re: Object Orientation in GTK



>> On Mon, 9 Nov 1998, Manni Wood wrote:
>>[snip stuff about GTK C++ bindings stability]
> 
> [snip stuff about GTK+, GTK--]
> Havoc

On a related note (and not intending to start a C++ vs foo flamewar),
I have always thought that the choice to write GTK (also GDK, glib)
in C was one of the reasons that GTK is as nice as it is, and as
successful as it is.

My reasoning?  The OO _design_ behind GTK, implemented though it
may be in C, with OO idioms coded from the ground up in C,
is very obvious regardless of the language you write an app in.

As such, the object model of GTK maps _very_ naturally to OO
in C++, Objective C, Perl, and a plethora of other languages which 
have native _syntax_ support for OO.

But, the often overlooked part about the GTK object model
is that it maps, again, _very_ naturally to languages which have
_runtime_ support for OO -- I think here specifically of Objective C
and Perl, though others such as the Python bindings and hypothetical 
Smalltalk bindings would be in the same category.

And, it is the bit about _runtime_ support for OO where toolkits
(GUI or otherwise) which are C++ based fall down for me, and I think,
for many others.


All C++ vs foo rhetoric aside, C++ as an OO language puts its eggs
in the "syntactic support" basket.  As such, languages which put
their cleverness and best idioms into the "runtime support" basket
find that when interfacing to C++ code, the fit is not natural.

But, (and for me, this is the genius of the basic object model of GTK),
GTK, being written in C with no C++ -centric (or Objective-Modular-
Functional-Eiffel++for-Scheme -centric, for that matter) assumptions
in particular, maps naturally to MANY languages, be their support
for OO "the hard way" (C, ...), "syntactic" (C++, ...), or 
"syntactic + runtime" (Objective C, Perl, ...).

And this, I believe IMHO, is the reason that GTK, and not
(Qt, V, Xt, Motif, others...) has gathered the most mindshare,
the most "favorite-language-here" bindings (2+, for some languages),
and the most active current development.



I feel compelled to point this out because, in the past few years,
as Linux (and source-available stuff in general) has become so
ubiquitous, a little examination of the GUI development scheme
showed a state of heavily split developer mindshare...and we know
how consistent an X desktop can look with OpenWindows, Xt, Motif,
Qt, and JRandom toolkit apps on it can look.

And, that split mindshare wasn't helping anyone much,
though arguably it represented strong evolutionary striving for 
the best toolkit...certainly however it did not make for a
strong, unified GUI development community.  (Want to find a 
V, or Xt guru?  There are probably even enough such out there to 
represent a useful group to talk to...but they are not in an actively 
talking _community_.)

Now, GTK comes onto the scene, and I see its' many-bindings-available
nature as a strong unifying force.  And, it is the C-based, 
language-specific-OO-nicety-free nature of GTK that enables this.

So, congratulations on an exceptionally-well executed design,
all ye GTK developers.  ...And, do keep in mind the power that
a language-neutral core gives you...

----
Sam Glasby <sglasby@primenet.com> 
    Pagan, RPG designer, and user of Linux and Emacs



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