Language Issues with C++

I have made a career out of programming, mostly in C++. It is a language I enjoy and is pretty much my language of choice when I write a program to accomplish something useful. It is useful for almost any imaginable coding task. Just like being familiar with your crazy uncle Larry though, it has a few idiosyncrasies and perhaps a few things that I think would make it just a little better.

Here are a few tweaks/adjustments and new features that I believe would improve the C++ language:

  • Two types of whitespace. Yes, its the old “tabs versus spaces” thing again. Why does the language have this problem anyway?
  • #include/#import file search rules for double quote angle bracket syntax… why do we need both?
  • C++ lacks module support for or even acknowledgement of the concept. Languages such as Pascal and Java have at least a basic understanding of the concept. C++ could use this as well.
  • C++ lacks a reasonable concurrent memory model.
  • The language has poor support for concurrency (C++11 is on the way there but hasn’t arrived at the station yet)
  • The precompiled header problem is something that is not defined into the language. Every compiler vendor that I am familiar with has implemented something to solve the long compile time problem, but the techniques and methods are uneven between platforms and the implementation details seem to be designed for the most simplistic software project.
  • There is a lack of “negative declaration” identifiers that can help the programmer make mistakes. For example, there is a ‘virtual’ keyword but there should also be an explicit ‘non-virtual’ keyword.
  • C++ has several overloaded identifiers. The ‘static’ keyword means several things depending on where it is used. It can mean that there is only one instance of something application wide. It also has implications on linkage and object lifetime.
  • There are several keywords that are missing. As computer software technology has advanced, several new coding concepts have arisen, and C++ has not kept pace with these. There should be ‘interface’, ‘default’, ‘inherit’, ‘disabled’ and other keywords (some of which are defined in C++/CLI).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s