Page 1 of 2
C++0x is done.
Posted: Wed May 04, 2011 1:54 am
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!
Re: C++0x is done.
Posted: Sat May 07, 2011 7:23 pm
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?
Re: C++0x is done.
Posted: Sun May 08, 2011 2:33 am
by Karlosoft
Is there any good feature for who writes operating systems?
Re: C++0x is done.
Posted: Sun May 08, 2011 6:04 am
by Solar
Re: C++0x is done.
Posted: Sun May 08, 2011 1:24 pm
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++.
Re: C++0x is done.
Posted: Sun May 08, 2011 6:27 pm
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".
Re: C++0x is done.
Posted: Mon May 09, 2011 2:01 am
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).
Re: C++0x is done.
Posted: Thu May 12, 2011 5:33 pm
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!
Re: C++0x is done.
Posted: Fri May 13, 2011 3:18 am
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.
Re: C++0x is done.
Posted: Tue Jun 21, 2011 4:27 pm
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.
Re: C++0x is done.
Posted: Wed Jun 22, 2011 1:10 am
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.
Re: C++0x is done.
Posted: Wed Jun 22, 2011 8:54 am
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.
Re: C++0x is done.
Posted: Fri Jun 24, 2011 8:35 pm
by TylerH
Solar wrote:Firefox, OpenOffice et al.
Isn't Firefox [predominantly] in C, and Open Office in Java?
Re: C++0x is done.
Posted: Sat Jun 25, 2011 12:06 am
by Brynet-Inc
TylerH wrote:Solar wrote:Firefox, OpenOffice et al.
Isn't Firefox [predominantly] in C, and Open Office in Java?
No.
Re: C++0x is done.
Posted: Sun Jun 26, 2011 1:11 pm
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