Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Programming

C++0x Finally Becomes a Standard 398

Samfer writes "On Friday August 12th 2011, the results for the final ISO ballot on C++0x came in, and the ISO C++ Standards Committee were unanimous in favor of approving the new C++0x (for now unofficially known as C++11) object-oriented programming language standard which is intended to replace the existing C++ standard. The new standard is to offer new and improved features such as lambda functions, concurrent programming functionality, direct data field initialization, and an improved standard library to name but a few." Although I haven't heavily used C++ in years, it is nice to see a decade long effort finally come to fruition. Especially nice is the support for type inference which should save quite a few people from RSI and make refactoring code a bit less obnoxious.
This discussion has been archived. No new comments can be posted.

C++0x Finally Becomes a Standard

Comments Filter:
  • After the standard is before the standard...
  • by StripedCow ( 776465 ) on Tuesday August 16, 2011 @12:47PM (#37109296)

    List of missing features:

    - coroutines
    - multi-stage/active library programming (i.e., something that fixes the syntactical mess of most template libraries)
    - precise garbage collection (not that I'm missing it)
    - fully opening up of the memory model (allowing libraries to implement complex memory handling such as garbage collection or persistence)

    • by elrous0 ( 869638 ) * on Tuesday August 16, 2011 @01:17PM (#37109710)

      You lazy, spoiled punks with your Java and C# garbage collection. Back in my day, we collected our OWN garbage. It was a miserable task, but we were ignorant and didn't know any better. AND WE LIKED IT!

    • by NumLuck ( 1632865 ) on Tuesday August 16, 2011 @01:34PM (#37109922)

      - precise garbage collection (not that I'm missing it)

      What is the matter with everyone wanting a garbage collector? Personally, I find smart pointers to be far superior to garbage collection and the new standard now incorporates them in the STL (strongly influenced by BOOST)! With them, the sole idea of garbage collection in C++ is somewhat useless and obsolete.

  • They didn't call it C++0b

    Oh and didn't include garbage-collection outright ( though they did design it with gc in mind ).

  • oh hell... (Score:2, Funny)

    by Anonymous Coward

    ...the 11th plague of Egypt has arrived a little bit late.

  • How do you pronounce that? It's like they want to advertise that this is a baroque language.

  • by AdmiralXyz ( 1378985 ) on Tuesday August 16, 2011 @12:49PM (#37109324)
    As the inaugural copy of the reference manual for the new standard was being printed and bound, it underwent gravitational collapse due to its enormous mass and became a black hole, killing all the committee members. Stroustrup was quoted as saying that despite the misfortune, he still has confidence that the C++0x standard will help programmers be more productive and efficient.

    and WOOSH there goes my karma...
    • by bonch ( 38532 ) *

      and WOOSH there goes my karma...

      No, that was the sound of the reverse psychology ploy. Declarations of doomed karma give karma!

    • by LWATCDR ( 28044 )

      I was thinking the same thing. The orignal white book was only 228 pages. C++ made C into a huge language that makes Ada look compact! Some of the additions are handy but so much of it seems to be just tricks.
      Smaller and simpler seem to be a better way to go.

  • What's with the random links in TFS? Specifically, why link to c2.com for "type inference" and intel.com for "lambda functions"? Wikipedia wasn't good enough for those?
    • pecifically, why link to c2.com for "type inference" and intel.com for "lambda functions"? Wikipedia wasn't good enough for those?

      Have you ever browsed around c2.com? It's great. Wikipedia is good as a generic "fail-safe" resource, but I'd rather see a deep subject-matter wiki being cited where appropriate.

      I imagine the Intel article was referenced due to its examples of syntax. It's more specific than a general encyclopedia entry on lambda functions.

  • by jabberw0k ( 62554 ) on Tuesday August 16, 2011 @01:00PM (#37109502) Homepage Journal
    Perl 6 should arrive in 2019. p.s., As for lambada functions, I hear the best ones are in Buenos Aires.
  • by Animats ( 122034 ) on Tuesday August 16, 2011 @01:12PM (#37109644) Homepage

    It's nice that they finally got the standard done. But there's so much junk in there. The C++ committee was dominated by people who wanted to do cool things with templates.

    Some years ago, someone figured out that it was possible to abuse the C++ template system into doing arbitrary computations at compile time. This developed a fan club. That fan club has dominated the C++ standards committee, because nobody else cared. So now we have a standard for C++ which supports template-based programming a little better.

    Current thinking seems to be that,while template programming is too hard for ordinary programmers, the templates will be written by l33t programmers and then be used by the lower classes. Unfortunately, if anything goes wrong, the end user has to look at the innards of the template to find the problem. We went through this with LISP decades ago. Check out the MIT Loop Macro [cmu.edu], That finally became stable about the time LISP died out.

    Note what isn't in the new C++. There's no more memory safety than in the old one. (Fans will say that it's safer if you only use the new features. Now try to call some library that doesn't use them.) So the buffer overflow attacks and crashes will continue.

    C++ is the only language to offer hiding without memory safety. Hard-compiled languages from Pascal through Go have hiding with safety, as do all the major scripting languages. C has neither hiding nor safety; the pointer manipulations are right there in the source. There have been safe, hard-compiled languages without garbage collection, most notably Ada and the Modula family. Safety and speed are not incompatible.

    • I think you hit the problems with templates nicely. While they were sitting around arguing over concepts, they could have been including support for multithreading. The new move semantics are nice, as are "official" smart pointers, though I am kind of cringing thinking about how much of a pain dealing with incompatibilities with boost smart pointers or other smart pointer libraries might be.

      With the exclusion of concepts, the latest standard just moves C++ farther into an experts-only language. The whole st

      • by TheRaven64 ( 641858 ) on Tuesday August 16, 2011 @02:25PM (#37110544) Journal

        While they were sitting around arguing over concepts, they could have been including support for multithreading

        Actually, they did add some support for threading. C++11 has support for a thread-local storage qualifier and a rich set of atomic operations. These are both also in C1x. There is also now a std::thread class, and various synchronisation primitives, and even support for futures / promises.

        Much as I dislike C++, the latest version does have a subset that is much nicer than any subset of previous versions.

      • Re: (Score:3, Informative)

        While they were sitting around arguing over concepts, they could have been including support for multithreading.

        They did include support for that. That's been a well-known piece of the new standard for nearly 2 years now.

        • Wow, you are right. I thought that got dropped from the final version of the standard. I haven't seen anyone write about those features in a long time.

    • by tibit ( 1762298 )

      The loop macro is, in essence, part of the compiler or the standard library. It is code that processes code during compilation. I'm not surprised that it's nontrivial.

    • by jgrahn ( 181062 )

      Some years ago, someone figured out that it was possible to abuse the C++ template system into doing arbitrary computations at compile time. This developed a fan club. That fan club has dominated the C++ standards committee, because nobody else cared. So now we have a standard for C++ which supports template-based programming a little better.

      Current thinking seems to be that,while template programming is too hard for ordinary programmers, the templates will be written by l33t programmers and then be used by the lower classes.

      You're thinking about Template Meta-programming, not the everyday templates I use.

  • by Anonymous Coward on Tuesday August 16, 2011 @01:21PM (#37109744)

    First DNF, then a HURD kernel, now C++0x... Remind me to send some parkas to hell.

  • So C++ takes another step closer to Lisp (lambda functions) whilst completely missing the most important part (closures and higher order programming).

    I look forward to C++ 2031 when they implement garbage collection but still require you to place and remove locks on memory ;)

    *Ducks and runs for cover*

    • *facepalm* C++0x has closures. For example, here [informit.com] is an article talking about them in C++0x. Hell the article is 3 years old at this point.

  • type inference which should save quite a few people from RSI
    Because surely, the hard work of writing code is in all that typing.

    and make refactoring code a bit less obnoxious
    Because yeah, refactoring is all about continuously retyping your variables.

    I haven't heavily used C++ in years
    ... and never coded anything beyond a two-dice simulation.
    • Because surely, the hard work of writing code is in all that typing.

      No, but when you use a lot of for loops with iterators being able to type, for example, auto i = ivec.begin(); instead of vector::iterator i = ivec.begin(); makes things a lot less tedious and, for me, makes things more readable with less noise obscuring the intent of the code.

      • That was meant to be vector<int>::iterator. And obviously in my example this isn't as bad, but say you are dealing with a more complex container declaration and the type of the iterator can expand out like crazy.

A university faculty is 500 egotists with a common parking problem.

Working...