Linked by Amjith Ramanujam on Wed 20th Aug 2008 19:37 UTC
General Development DevX interviewed Bjarne Stroustrup about C++0x, the new C++ standard that is due in 2009. Bjarne Stroustrup has classified the new features into three categories Concurrency, Libraries and Language. The changes introduced in the Concurrency makes C++ more standardized and easy to use on multi-core processors. It is good to see that some of the commonly used libraries are becoming standard (eg: unordered_maps and regex).
Permalink for comment 327494
To read all comments associated with this story, please click here.
Too many language features
by CrazyDude1 on Thu 21st Aug 2008 00:31 UTC
Member since:

The reason I dislike is that the language has evolved and has added many features.

C++ tries to be both a high level language by providing OOP and it tries to be low level language by providing direct memory access, using pointers etc.

And it also adds lots of other features like templates, operator overloading, function overloading, exception handling etc.

IMHO the way this language has evolved, it has become a mess. I do both level of programming i.e. hardware programming and at times (for fun) user mode programming. And C++ doesn't fit in either. For user mode code, I prefer C# and for low level stuff, I prefer C.

I think the only place where C++ remains important is user mode applications where performance is super critical. The trend I see is that people implementing all non-performance critical code in higher level languages like C# and just write the performance critical code in C++.

In the past I also used to use C++ a lot but I had one horrible experience where a programmer wrote code which used nested templates inside nested templates inside nested templates. This led to object initialization so complex that when there was memory leak, it was just impossible to debug.

Another problem was use of exception handling, now with C error handling, when you step over a function call, it breaks on next instruction. But in C++ you may land up at a totally different place where the exception is caught and then you can't check any local variables because guess what, your stack is unwound.

And to make matters worse, people use auto_ptr and boost crap. This stuff if it works it is fine, but once you leak memory with auto_ptr, then god help you find that memory. This is not really C++ fault but well boost etc is common to C++ only. Really C++ was not designed with garbage collection and people shouldn't try to do that in C++.

Anyways now I use C++ sometime but with a much constrained set of features like C + Classes + single inheritance and no templates (other than STL) and no operator overloading and no exception handling crap.

C++ basically makes it easy to write bad code due to its numerous features.

Reply Score: 2