C++0x is done.

Programming, for all ages and all languages.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

C++0x is done.

Post by Solar »

This information is a couple of weeks old already, but it was new to me, and I suspect, some others on this board too.

The committee is done with the technical changes, and has signed off on the standard.

The Final Draft is available here.

With some red-tape stuff pending, the official standard is expected this summer.

Thanks for the hard work, guys! =D>
Every good solution is obvious once you've found it.
eddyb
Member
Member
Posts: 248
Joined: Fri Aug 01, 2008 7:52 am

Re: C++0x is done.

Post by eddyb »

Good Job. I'm also waiting for ES Harmony. After that, I won't be able to tell which I'm going to use if I ever write an userspace app.
Maybe JS with inline ASM and static compilation?
User avatar
Karlosoft
Member
Member
Posts: 277
Joined: Thu Feb 14, 2008 10:46 am
Location: Italy
Contact:

Re: C++0x is done.

Post by Karlosoft »

Is there any good feature for who writes operating systems?
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: C++0x is done.

Post by Solar »

#-o :roll:
Every good solution is obvious once you've found it.
OSwhatever
Member
Member
Posts: 595
Joined: Mon Jul 05, 2010 4:15 pm

Re: C++0x is done.

Post by OSwhatever »

Will C++0x save C++ or is it another step into "inverbosibility"?

D language is nicer but as long the toolchains are mainly C/C++ I'm stuck with C++.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: C++0x is done.

Post by Solar »

There is no need to mention D in a C++ thread. Or git in a svn thread. Or maven2 in an ant thread. People - or languages - don't need "saving".
Every good solution is obvious once you've found it.
User avatar
Creature
Member
Member
Posts: 548
Joined: Sat Dec 27, 2008 2:34 pm
Location: Belgium

Re: C++0x is done.

Post by Creature »

I must say they did a splendid job of bringing C++ more up-to-date with the new features. Lambda expressions make it much easier to e.g. search through containers and operate on them. I've also found the auto keyword to be particularly useful where you usually have to write long iterator types.

Other features like nullptr are useful in situations where ambiguity might exist (much like C's NULL), but I have yet to encounter such a situation in my code. I've also noticed the custom suffixes and unicode support, which look very promising, but the compilers don't support all of them (yet).

Does anyone have experience with the range-based for-loop (a.k.a. foreach)? It looks suprisingly like Java's one.

PS: Quite a few people told me that C++ is a dead language, it's no longer used, and so on (they couldn't be more mistaken), I guess this pretty much proves them wrong. A lot of newer languages are nice, but I still believe C and C++ give a more "down-to-the-bare-metal" feeling when using the language. It also forces you to know what you're doing (e.g. when using pointers and dynamic memory allocation).
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.
rbmj
Posts: 11
Joined: Tue Jan 13, 2009 4:24 pm

Re: C++0x is done.

Post by rbmj »

Does anyone know if C++0x support is going to require any more work with the ABI? Most of the features seem like they would be all compiler-side, and obviously the standard library improvements are irrelevant to a freestanding code base, but there might be something that requires some work to get supported in kernel code.

As far as 0x's features go, I'm particularly interested in lambdas and variadic templates- tuples, a strongly typed printf, a host of functional programming... all you need is monads and list comprehensions and C++ has EVERYTHING!
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: C++0x is done.

Post by Owen »

It shouldn't require any more of a runtime library than C++03 does. That said, features like lambdas are probably going to need you to implement stuff like std::function (<-- which itself requires the heap) to use in a lot of situations.
mmiller235
Posts: 4
Joined: Mon Jun 20, 2011 7:27 pm

Re: C++0x is done.

Post by mmiller235 »

Creature wrote: PS: Quite a few people told me that C++ is a dead language, it's no longer used, and so on (they couldn't be more mistaken) . . .
I know this thread is slightly old but I really felt the need to throw my two cents in on this point. In my experience, the whole C++ is a dead language thing is something you hear from Java or .NET fanboys who don't know jack about programming and who are completely dependent on WYSIWYG form editors and code generation tools.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: C++0x is done.

Post by Solar »

+1.

Ask them which language their JVM or CLI is written in.

Don't get me wrong. Java and C# are good languages when you have to develop code for the customer. C++ can be used for this, too, and would certainly be even better if a big company like Sun or Microsoft had a native interest in pushing the language and its tools. (Remember: Java and C# both have enjoyed a multi-million-dollar marketing budget, something C++ never had.) As it is, C++ wouldn't be my first choice for that.

But that's not really where C++ "rulez", either.

It's the frameworks themselves, and the core code where managing your own memory is more or less required to get any kind of acceptable performance.

"Virtual" languages are A Good Thing, and certainly superior in the RAD department, but there are other areas where they just don't cut it.

C++0x is a great step forward for the biggest, ugliest, most powerful beasts among the programming languages. It won't wrestle world dominance away from Java or C#, nor does it intend to, but it does give more power to those who used it to bring you Firefox, OpenOffice et al.
Every good solution is obvious once you've found it.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Re: C++0x is done.

Post by Colonel Kernel »

I've been missing C++ lately, especially since watching these:

http://channel9.msdn.com/posts/AFDS-Key ... -and-C-AMP
http://channel9.msdn.com/posts/Daniel-M ... with-C-AMP

Lambdas give C++ so much power... I wish they had been around four years ago when I really needed them. :?
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
TylerH
Member
Member
Posts: 285
Joined: Tue Apr 13, 2010 8:00 pm
Contact:

Re: C++0x is done.

Post by TylerH »

Solar wrote:Firefox, OpenOffice et al.
Isn't Firefox [predominantly] in C, and Open Office in Java?
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: C++0x is done.

Post by Brynet-Inc »

TylerH wrote:
Solar wrote:Firefox, OpenOffice et al.
Isn't Firefox [predominantly] in C, and Open Office in Java?
No.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: C++0x is done.

Post by Solar »

TylerH wrote:
Solar wrote:Firefox, OpenOffice et al.
Isn't Firefox [predominantly] in C, and Open Office in Java?
CLOC is a good tool for questions like that...

Firefox 4.0.1:

Code: Select all

Language           files     blank   comment      code    scale   3rd gen. equiv
--------------------------------------------------------------------------------
C++                 4123    304701    327477   1537649 x   1.51 =     2321849.99
C                   1984    178829    275881   1004358 x   0.77 =      773355.66
HTML               14069    114307     25211    806452 x   1.90 =     1532258.80
Javascript          7259    193478    260262    652939 x   1.48 =      966349.72
C/C++ Header        5395    140051    383735    591692 x   1.00 =      591692.00
OOo 3.3.0 Core:

Code: Select all

Language           files     blank   comment      code    scale   3rd gen. equiv
--------------------------------------------------------------------------------
C++                 9381    708949    738536   3950573 x   1.51 =     5965365.23
Java                3254     84621    201805    382286 x   1.36 =      519908.96
IDL                 4356     76854         1    332358 x   3.80 =     1262960.40
XML                  906      4246      3536    145450 x   1.90 =      276355.00
C/C++ Header         951     20553     44199     85981 x   1.00 =       85981.00
XSLT                 134      3614      6563     76262 x   1.90 =      144897.80
C                    285     16174     21006     73818 x   0.77 =       56839.86
Perl                 260     17671     18899     68667 x   4.00 =      274668.00
Every good solution is obvious once you've found it.
Post Reply