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



*-Paul Miller <Paul_Miller@avid.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.

Hm. You're saying that void pointer arithmetic is illegal in ISO C,
but some compilers allow it. Then you say that no compiler will
allow it in C++ because it is illegal. Logical?

| 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.

I concur.

-- 
The only way tcsh "rocks" is when the rocks are attached to its feet
in the deepest part of a very deep lake.             (Linus Torvalds)
olet@ifi.uio.no   [-: .elOle. :-]   olet@debian.org



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