[9406] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: Was : Why is gtk+ written in C? - now : Quick Rant

daemon@ATHENA.MIT.EDU (Paul Miller)
Mon Oct 19 11:05:16 1998

Date: Mon, 19 Oct 1998 10:50:00 -0400
From: Paul Miller <Paul_Miller@avid.com>
To: gtk-list@redhat.com
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

> I think that the real issue is that C has been standardized for a long
> time,
> so that if you stick to ANSI C you can be reasonably sure that most systems
> will
> be able to compile it, while the C++ standard has been

The main argument for C++ in my previous post was because of its
better-defined language and type-safety, it might avoid some problems
people are having (myself included) while attempting to compile packages
written in "ANSI" C. "ANSI" appears to be a nebulous term these days for
any code with "const" in it. Unfortunately, gcc lets way too many things
not "ANSI" slip by (like pointer arithmetic on void pointers). It's
impossible to do void pointer arithmetic in C++ (without an explicit
cast), no matter what compiler, because it is illegal.

The point wasn't merely so much about C++ being better for type-safety
(it is), but that "ANSI C" isn't nearly as "ANSI" as people think it is,
because compilers allow things like that to slip by.

If we all pay a bit more attention and turn all warnings and errors on,
we may yet get to the point where everyone can compile the code.

Cheers,

-Paul

-- 
Paul T. Miller                | paul@elastic.avid.com
Principal Engineer            | Opinions expressed here are my own.
Avid Technology, Inc. - Graphics and Effects Software Group

-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post