News for hackers. Stuff that matters.
Re:A Deeply Skeptical Look at C++0x by scott_s on Thursday August 21, 2008 @10:11AM (#282682)
A lot of people don't like C++. I get that. What I don't get is why people feel personally affronted by the changes. All of the language extensions address real problems that have been faced by real programmers.

C++0x is the solution a large group of people came up with to answer a lot of problems. Articles like this one are written by people who appear to be largely ignorant of these problems. The implicit assumption here is "I'm smarter than the C++ committee." If you think that, then you should wade through the documents produced by the committee and see how you would solve these problems: http://www.open-std.org/jtc1/sc22/wg21/

Re:A Deeply Skeptical Look at C++0x by ajross on Thursday August 21, 2008 @12:33PM (#282840)
You're looking at the wrong level of abstraction. The C++ standards committee is no doubt a group of very smart people. But they're trying to "evolve" C++ by adding every feature under the sun. It doesn't matter how smart you are; if you try that, you'll make a mess. In fact, the very fact that these are smart people might be blinding them to the fact that they're designing a language to be used by mere mortals.

Really, C++ started simply. Early cfront languages were delightful, IMHO (with a few warts, like "protected", which in hindsight were a mistake). It was C, but with a pleasing syntax for class encapsulation and virtual function dispatch. I still write most of my C++ in that language.

But then we got multiple inheritance, and operator overloading, and placement new, and constructor initializer lists, and koenig lookup, and RTTI, and templates, (pause for breath) and now garbage collection, and synchronization, and lambdas. When will it end!? Every one of this changes is justifiable in isolation, but the end result is a language that almost no one actually understands (literally: I'm not sure I know anyone in my professional circle with a solid grasp of the entirety of C++ -- contrast that with the fact that almost everyone knows C more or less perfectly).

Re:A Deeply Skeptical Look at C++0x by timr on Thursday August 21, 2008 @04:01PM (#283091)
" It was C, but with a pleasing syntax for class encapsulation and virtual function dispatch. I still write most of my C++ in that language."

Then you aren't using the language -- you're using C with classes. Which is fine, but don't make comments as though your usage patterns reflect the mainstream. C++ has moved well beyond C, and it's a different language now.

IMO, the roots of C++ in C are both its biggest strength, and its greatest liability. Sure, this ensures compatibility with a ton of old code, but this compatibility also adds lots of ugly warts to the language syntax. Moreover, to this day, lots of C coders are fooled into thinking that they're dealing with a language that's "C plus a few features", and they're invariably shocked when it turns out to be a totally different (and more powerful) programming environment. They then tend to complain loudly on the internet that the language is a disaster, without ever really trying to understand it for what it is.

Re:A Deeply Skeptical Look at C++0x by orib on Thursday August 21, 2008 @10:47AM (#282721)
You forgot the biggest problem; You don't want to force several hundred millions of lines of code to be rewritten, of you want the porting to be trivial and the changes to cause compile failures ("oh. sorry. we've turned that into a keyword now; change the name" sort of porting)
Re:A Deeply Skeptical Look at C++0x by scott_s on Thursday August 21, 2008 @10:59AM (#282736)
I actually didn't list any problems, but I know the committee thinks of backwards compatibility when considering new features. Pick one of the documents and you'll probably find it mentioned.

As an aside, I think that C++ has gone too much out of its way to not introduce new keywords. That's why, for example, the syntax for lambdas looks odd and reuses previous tokens, and the new nullptr keyword is not just "null." If you're unwilling to break old programs, then you can never clean up; think OSX vs. Windows, or even Python's willingness to break compatibility with version 3.

Re:A Deeply Skeptical Look at C++0x by adamc on Thursday August 21, 2008 @01:17PM (#282893)
The last time around, the committee invented lots of features on the fly, many of which turned out to have far-reaching negative effects. (Think of the books that have been written on subjects like writing exception-safe code.) So I wouldn't lean too hard on "I know the committee thinks of backwards compatibility".