Re: C vs C++ for GTK



Michael,

Thanks for the feedback, it seems we are on the same page on several counts.  

James,
----- 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
topic.

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
 get
the impression that Patrick already has some C proficiency.


Yes, my preference is C/GLib/Gtk+.  But I use lots of other when
 needed.

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
 in
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
 good.
 In fact it's important for all computer programmers to know, in my
 opinion.

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.


-- 
Michael Torrie
Assistant CSR, System Administrator
Chemistry and Biochemistry Department
Brigham Young University
Provo, UT 84602
+1.801.422.5771

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






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