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).
Thread beginning with 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
CrazyDude1
Member since:
2007-09-17

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

RE: Too many language features
by righard on Thu 21st Aug 2008 01:15 in reply to "Too many language features"
righard Member since:
2007-12-26

Maybe you should give Objective-C a try.

Reply Parent Score: 3

tyrione Member since:
2005-11-21

Maybe you should give Objective-C a try.


Agreed, but in this crowd the notion of ObjC is grounds for an immediate -5, if it were possible.

Reply Parent Score: 4

RE: Too many language features
by evangs on Thu 21st Aug 2008 06:33 in reply to "Too many language features"
evangs Member since:
2005-07-07


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.


I hope you are aware that STL makes very heavy use of exceptions? If you intend to write secure and robust code using the STL, you are going to need exception handling.

Reply Parent Score: 2

davmac Member since:
2008-08-21

I hope you are aware that STL makes very heavy use of exceptions? If you intend to write secure and robust code using the STL, you are going to need exception handling.

No. STL generates exceptions only in exceptional conditions. You can write perfectly secure and robust code in C++, while using the STL, without writing exception handlers.

About the only exception that can happen, if your program doesn't actually do something which explicitly causes an exception, is one caused by an out-of-memory condition, and often just letting that propagate until it kills the process is the right thing to do anyway.

Reply Parent Score: 3