|
|
|
|
|
by marshray
5392 days ago
|
|
I think your missing a key point: C++11 is a better, cleaner language. It's not C++98 with a bunch more not-fully-baked and overly complex stuff thrown in. Much of the new stuff that's added is there to make the old complexity go away. Most of the old mile-long redundant type definitions can go away now, being replaced with just the 'auto' keyword. The old std:: argument binders were like poor man's lambdas. Now we have real lambdas and don't need them. The old practice of defining tons of template overloads is no longer required because we have proper variadic templates now.
To unfairly pick one example at random of what should no longer be necessary:
http://svn.boost.org/svn/boost/trunk/boost/type_traits/detai...
Of course this is special purpose-library code that isn't the kind of things most applications would need to write, but it could easily end up in a compiler warning or error message. Sure, of the people who really didn't like C++ before then C++11 might not change all their minds. But for those of us who used and liked C++ already, these new features represent great simplifying improvements that are only going to help with ongoing maintenance. |
|
C++ is a good language, with some clunk to it. The best parts of it are arguably the bits inherited from C (which C++11 looks like it might break with). The OOPy parts (classes, polymorphism, etc.) have been done better by languages like Java, Javascript, and Smalltalk. Templates exist to get around grossness of the rest of the language, and were done better by Java's generics anyways. Multiple inheritance was done better by Java in the form of interfaces.
The rhetoric is that these changes somehow simplify the language--that's cool and all, and may even be true for the most trivial of examples or the most basic of beginners. The problem is that these new features are going to be released in the wild alongside many libraries who don't use them, being old, and who won't be updated, being cumbersome or trusted. And so, the burden of making the ends meet is going to fall on the rest of us who now have to support, in effect, two languages.
If the improvements are incremental, then this wasn't worth doing, If the improvements are such a new, cleaner, simpler language, why the hell call it C++? Again, see D.
Lastly, most of the fixes are syntactic sugar which do nothing to help fix some very real issues with the deployment of the language.
How do I bind these things to other languages cleanly? In C this is trivial--why isn't this fixed in C++11?
How do I load libraries of classes dynamically at runtime? From C wrappers?
When interfacing with old libraries (which actually do exist), how often am I going to have to write some kind of NULL-nullptr glue code?
Why do we not have variable length arrays (they're in C99)?