tags:

views:

209

answers:

4

So I've been trying to do some research and would like the opinions of other developers on this topic. I am an experienced C++ programmer and have been using the current C++ standard for some time. I have been reading articles that "C++0x will undoubtedly become the new standard." How far off are we does everyone think from making the switch to a whole new programming standard? Also, which, in your eyes, is a better standard? From how I understand it, C++0x will come with more standard libraries making development easier without many more dependencies. Please help me to catch up!

Thanks!
Dennis M.

+10  A: 

It would be pretty sad if the next version of C++ were quantitatively worse than the current one. The entire point of the new revision is to improve things.

Chuck
Naturally. But I read something about "Boost" being similar to a C++0x; is that statement far off? I feel boostlib is very good for somethings, but I am not a huge fan of it myself. Sorry for such a seemingly asinine question, I'm trying to simply perceive a better concept of where things are moving.
RageD
@Dennis: Boost is an unofficial "de facto" standard library for C++ that is intended to provide libraries that work well with the C++ standard library. It is intended that libraries in Boost are that are broadly useful will eventually get standard (as has happened with things like `shared_ptr<T>` already). Read all about it at http://www.boost.org/
Ken Bloom
@Ken, true. But @Dennis, of course, like any part of the standard library, it's your choice if and when to use it. So, e.g. if you didn't use `boost::shared_ptr`, you don't have to suddenly start using `std::shared_ptr`.
Matthew Flaschen
Boost and C++0x are actually pretty closely related -- a lot of the same people are working on both.
Charles
+7  A: 

Well, it depends.

The current C++ standard (C++03) is currently "better" because most of the latest C++ compilers and standard library implementations conform fairly well to the standard. Yes, there are issues, but most of them are very well known (e.g., hardly any compiler supports export) or are fairly easy to work around.

Support for C++0x is pretty patchy right now. Different compilers support different parts and there have been pretty major modifications made to it over the last year, so compilers that did provide early support for some features are now "buggy" if you consider their conformance to the latest drafts.

Going forward, though, C++0x will be a huge improvement over C++03. Major features like the concurrency memory model and the standard threads and atomics libraries are extremely important for the future of the language. Move semantics will make it easier to write clean, high performance code. Most of the new language features will make developing in C++ a more enjoyable experience.

James McNellis
+2  A: 

"C++0x will undoubtedly become the new standard" is an understatement. C++0x is the draft of the new standard. Parts of it are available now in compilers like G++ 4.5.

It is impossible for C++0x to be qualitatively worse than the current C++ standard, because one of the essential things about the new standard is that it is fully backward compatible. If there are bad parts, you can just avoid them. (Of course, that doesn't mean that new features in C++0x can't be used to create really bad code that you'll have to deal with, but if you're coding on your own, you can always choose to avoid C++0x features that are worse in your opinion.)

Ken Bloom
"One of the essential things about the new standard is that it is fully backward compatible" - it's a very strong claim that's provably incorrect. For example, the following valid C++03 program: `int static_assert = 0;` - is not a valid C++0x program. It's a trivial case, but numerous other subtle differences are there. It is definitely _highly_ backwards compatible, though.
Pavel Minaev
You're exaggerating a bit. It's not *completely* backwards compatible. E.g. [unusual uses of auto](http://stackoverflow.com/questions/2847734/is-auto-int-i-valid-c0x) will break. Moreover, if languages grow too big, they can become unmanageable, and thus "worse". I don't think C++ has hit that point, but it's certainly a general possibility.
Matthew Flaschen
I just _love_ people who use the "impossible" word. People who think later versions cannot be worse haven't met my friend, Guido's, third wife :-)
paxdiablo
@dan04, I said that, didn't I.
Ken Bloom
@paxdiablo: That's because Guido's third wife wasn't built for complete backwards compatibility with his second wife.
Ken Bloom
+1  A: 

Depends on what you mean by "better". If you mean "More likely to work with whichever compiler I'm using at the moment", then the old standard will certainly be better, with a little boost thrown in.

Mark Ransom