The Artima Developer Community
Sponsored Link

Heron-Centric: Ruminations of a Language Designer
What C++ Does Wrong
by Christopher Diggins
September 10, 2005
Summary
When it comes down to it, C++ does only one thing wrong, it tries to be everyone's language.

Advertisement

Most reasonable complaints I have heard, and made, about C++ comes down to the same basic flaw, it tries to be the general purpose language. This is what makes the language so darn hard to use.

So how do you fix it? Well I think the specification should be split up. People writing C++ for PC's, really don't care about portability to embedded controllers! The problem is that you can't rely on the specification to give you anything concrete, not even a filesystem. I mean seriously, just because a handful of embedded micorocontroller programmers want to use C++ (incidentally most don't use true C++), does that mean the rest of us have to suffer?

So what is the solution? Well the standard should fork the specification into different branches. If I were designing my own language (which I am) I would encourage different specifications to branch off of a shared core specification (which I will do).

What I would want from C++ would be a core specification, and a sub-specification for PC's, and another for embedded microcontrollers. Unfortunately the committee is ignoring this, and we have the needs for these specifications being filled inadequately by Microsoft's Managed C++, and EC++. EC++ is a subset of C++, which is unfortunately the wrong way things should be going. If there is going to be an EC++ which is a subset of C++, then why is C++ continuing to be under-specified? I think C++ should allow EC++ to satisfy the embedded controller market and focus on supporting the machines where there is still substantial use.

Imagine the possibilities of C++ specification which integrated a linear memory model, 32 bit word size, threads, a filesystem, etc. I think C++ is spelling out its own demise, by refusing to modernize.

Talk Back!

Have an opinion? Readers have already posted 15 comments about this weblog entry. Why not add yours?

RSS Feed

If you'd like to be notified whenever Christopher Diggins adds a new entry to his weblog, subscribe to his RSS feed.

About the Blogger

Christopher Diggins is a software developer and freelance writer. Christopher loves programming, but is eternally frustrated by the shortcomings of modern programming languages. As would any reasonable person in his shoes, he decided to quit his day job to write his own ( www.heron-language.com ). Christopher is the co-author of the C++ Cookbook from O'Reilly. Christopher can be reached through his home page at www.cdiggins.com.

This weblog entry is Copyright © 2005 Christopher Diggins. All rights reserved.

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use