Re: [gtk-list] Re: Was : Why is gtk+ written in C? - now : Quick Rant
- From: Paul Miller <Paul_Miller avid com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Was : Why is gtk+ written in C? - now : Quick Rant
- Date: Mon, 19 Oct 1998 10:50:00 -0400
> I think that the real issue is that C has been standardized for a long
> so that if you stick to ANSI C you can be reasonably sure that most systems
> 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.
Paul T. Miller | email@example.com
Principal Engineer | Opinions expressed here are my own.
Avid Technology, Inc. - Graphics and Effects Software Group
] [Thread Prev