Re: C vs C++ for GTK
- From: Alan Lake <alan lake lakeinfoworks com>
- To: gtk-app-devel-list gnome org
- Subject: Re: C vs C++ for GTK
- Date: Tue, 27 Nov 2007 12:19:48 +0200
Just .02 € from a programmer who's been doing it for about 40 years. I
agree with most of what has been said on this thread. My thought is that
object-oriented thinking is entirely different from procedural thinking.
I think that one needs to settle on one paradigm or the other and stay
Personally, I'm using Ruby and like it very much. The reason is that it
allows me to concentrate on the project at hand rather than the details
of its implementation. There are occasions when a low level language
like C++ is needed, but why twiddle bits when bit twiddling only gets in
your way? IMHO, it is the true scientist who will use either C or C++,
because of the low level of code access. The question is, "Do you want
to drive a car, customize a car or design a car?" None is better than
the others. They are different disciplines.
GTK is written in C, I do believe, so the person programming in C can
get up close and personal with it. My Ruby-Gnome package wraps the C
code, so I can't get down and see exactly what GTK, as written, is
doing, but, then, I've not needed to.
Regarding the reference to euros. I'm an American living in Finland.
JAMES SCOTT wrote:
Thanks for the feedback, it seems we are on the same page on several counts.
----- Original Message ----
From: Michael L Torrie <torriem chem byu edu>
To: gtk-app-devel-list gnome org
Sent: Monday, November 26, 2007 5:32:22 PM
Subject: Re: C vs C++ for GTK
JAMES SCOTT wrote:
To list members following this subject: I have a question - not a
flame, as I try to understand the diversity of responses to this
How many of you who have suggested "Patrick" learn something other
than C, know C already for yourself. Over the course of my
experience I have found that learning assembler and C for a given
platform has helped me better understand and use that platform.
Also, knowing C make picking up or reading other languages like -
python, php, perl, and many others easier.
I agree to a point. C isn't going to teach you much about list
processing (a la LISP), domain-specific languages, lambda closures,
proper variable binding, functional programming, etc.
On the other hand, C helps one learn to manage resources explicitly
(even garbage collection can bite you if you don't understand how
resource management works), pointers, etc.
The ideal computer science program would make sure one first knows (IE
is taught) C, then some assembly, then Scheme, then Python.
I'm assuming that, those of you who are pointing another way -
already know C! Why not let Patrick follow your well worn path
through C/GLIB/GTK2, maybe he will come out afterwards to C++,
Python, or some other door.
Too late for that! Patrick's already well into Python. Python is a
great language to learn on, in my opinion. It's as instructive as
learning LISP or Scheme, but as useful as C or C++, or even Java. I
the impression that Patrick already has some C proficiency.
Yes, my preference is C/GLib/Gtk+. But I use lots of other when
I'm coming to the opinion that a good rule of thumb is just to always
use python unless specific needs dictate otherwise. Writing GUI code
a low-level, compiled language just doesn't seem to be the wisest thing
to do these days.
That's not to say that you're advice to learn assembly and C isn't
In fact it's important for all computer programmers to know, in my
When I have to write in C, Glib is a godsend. And of course GTK+ for
the GUI. Using Glib, I wrote a very complicated data parsing program
using dynamic strings, hash tables, and tree structures all with Glib
and only had one very small memory leak in 10,000 lines of code and
building and destroying many trees.
] [Thread Prev