C++ is indeed flawed. I think it would actually be quite easy to replace. I'm serious. You know why C++ hasn't been replaced yet? It's because every language that begins life as a competitor to C++ is seduced by some outside agenda that suddenly pulls it out of the running. The truth is no one wants to make a hardcore systems language. Halfway through making their "C++ killer language", they switch to an applications language, add garbage collection, remove pointers, mandate "safety", mandate exceptions, etc. For example, I can easily admit that C# is a better language than C++: it's more readable, easier to organize, more fun to use, etc. But at the end of the day, it's a garbage collected language that ties my hands with regard to low level constructs (or forces me to use tons of attributes and/or unsafe code to accomplish simple things in C++).
The way I see it, there's little point in criticizing C++ at this level until someone wants to step up and actually strive to build a replacement. I hope to do that one day. I'm actually working on a lexer/parser of my own. I'm sure I'll do a terrible job as my background is not in programming languages, but I want to set the ball in motion. So, what beef do I have with C++? Lots of things. I just wanna go down the list and fix them.
- Replace text-oriented #include/#define with proper module/macro system and a proper namespace/package system
- Bring naming conventions out of 1970
- Have nicely standardized int16/int32/int64 (instead of typedefs tucked away in the library)
- Hopefully introduce a handy build system (new kind of make file)
- Actually allow zero-cost abstractions (force inlining, etc.)
- Add nice portable libraries for things like SIMD and networking
- Expand enums to full fledged data tables
- etc etc etc
With all that said, are there actual C++ competitors out there? I don't really count Rust. The syntax is ugly as sin, and the obsession with safety is unappealing.