It is always amazing to see how long it takes for a legacy standard to be retired completely(or how long it takes for a new standard to be well accepted). For example, C programming language, it is now year 2005, the latest ISO C standard is C99, however, take a look at C projects out there, we are still trying to stick with C89/C90 standard as much as possible.

The obvious is the C++ style of inline comments with //, many projects I know of(include JXTA-C I am working on a lot) bans it. The reason: we want to stay with C90 as much as possible to avoid hassle when porting.

Is this a real concern? Or we just worry too much? I don't have enough experience in embedded system, but on any decent platform with a decent C/C++ compiler, I assume many of the common features of C++98 and C99 would be available. Oh, check out the Status of C99 features in GCC.

Another concern, perhaps, is the incompatibilities between C and C++. I am not sure how many conflicts are introduced in C99, but the incompatibility also exist in C90 for sure.

Anyway, I like C++ more than C, but unfortunately the ABI of C++ was not stable so that you don't really have much choice when you are implementing a library and expect to have many different language bindings. Hopefully the new C++98 can turn around the situation, but when will the C++98 standard be widely adapted? *Sigh*.

Comments:

I found Status of C99 features in GCC page a week or so ago as well while reading about the GCC 4.0 release. I too was disappointed to see how much is missing for a complete C99 implementation. More distressing was a copy of the same page which was produced for the GCC 3.3 release. Shockingly little progress has been made in the last 2 years on making C99 the default. <p/>After working in mostly Java for the last couple of years doing development in plain ol' C for JXTA-C for the last couple of months has been a little painful at times. Oh how I miss real inheritance and polymorphism. (and no, pointers to functions is not a complete replacement). <p/>I took an interest in Embedded C++ a couple of years ago. At that time I was working on RAID drivers and given the complexities of the C++ runtime model and libraries there was no way that C++ was going to work for drivers. I'd like to think that EC++ could also be used for libraries like JXTA. It has a simpler ABI, in some implementations compatible with the platform's C ABI. The compilers are often similar to the old <tt>cfront</tt> and compile to ASM via an intermediate C compiler. In some ways EC++ can be thought of as an intermediate step between C and full C++. And a nice small step in my opinion.

Posted by Mike Duigou on April 27, 2005 at 11:55 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

This blog copyright 2009 by slowhog