[ale] looking for a good C++ book for an experienced C programmer.

Michael B. Trausch mike at trausch.us
Thu Aug 19 12:13:22 EDT 2010


On Thu, 2010-08-19 at 10:01 -0400, Charles Shapiro wrote:
> Ooh, if you're writing an X11 program w/ C++ I heartily recommend the
> QT libraries. They're easy to work with and quite comprehensive.
> I've got a project written with them ( http://code.google.com/p/ksdb
> ).   Of course, they'll take you a little away from the metal.. 

I'd _personally_ recommend GTK+ as a basis for an application if the
application is intended to be able to be used for a long time or be a
stable thing.  GTK+ has been at 2.x for years, and while the next major
release, 3.x, is just around the corner, it's not going to be causing
all that much of an upset like new major releases of Qt seem to.  Don't
get me wrong, Qt applications can be quite pretty---but there are plenty
of them that no longer are maintained, and are “stuck” with the major
versions of Qt that they were written for, which isn't terribly useful
today.

Applications written today for GTK+, if all deprecated APIs are avoided,
should work just fine with GTK+ 3.0 with nothing more than a rebuild of
the source code.

Also, there's a bit more flexibility.  GLib, GLib-GObject, GDK (lower
level API more like Xlib), and GTK+ are all written in C, and accessible
from C++, Python, C#, D, and various other languages via bindings.  And
there is also the new Vala language that is written as a “native”
language for the GObject type system.  I would not use Vala for anything
that has hard maintenance requirements yet; it is still rather fluid.
For example, I need to update AllTray's source code because Vala changed
and now my code is incorrect according to the way the language is
defined today...

There are lots of applications that used to be written in Qt that are
now written with GTK+, probably because it's pretty uncool to be forced
to re-write the GUI code for an application due to a major release
coming out.  As far as I am aware, every piece of software that I am
running today will run on GTK+ 3.0 with little to no modification of
source code, and that is the way that I think it should be unless there
is *very* good reason not to have that.

	--- Mike



More information about the Ale mailing list