Slashdot Mirror


C++0x Finally Becomes a Standard

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.

6 of 398 comments (clear)

  1. Re:C++0x by Canazza · · Score: 3, Informative

    C Plus PLox

    --
    It pays to be obvious, especially if you have a reputation for being subtle.
  2. Re:nice, but still missing... by NumLuck · · Score: 4, Informative

    - 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.

  3. Re:Speaking of obnoxious by TheRaven64 · · Score: 4, Informative

    The x is a placeholder. C99 was C9x before it was standardised. The two digits specify the year (See: C89, Fortran77, and so on) in which the standard is finalised. This is the version of the standard that will be finalised some time between '00 and '09. In common with all other C++ projects, this one was completed late.

    --
    I am TheRaven on Soylent News
  4. Re:Nice, but maybe irrelevant. by rmstar · · Score: 3, Informative

    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.

    The problem isn't that it's notrivial. The problem is that when something goes wrong, the end user has to debug it by interpreting the mysterious error messages that are emitted by whatever part of its implementation finally ended up failing. That wouldn't be the case if it were part of the compiler. The compiler could detect errors in how it was USED and issue succinct error messages about that, rather than exposing how it is IMPLEMENTED.

    Lisp programmer here.

    The loop macro actually has access to all the innards of the compiler and gives reasonably useful error messages, at least when compared with standard issue C++ error messages. The loop macro is in fact a lisp program with full access to everything. It can and does produce error messages through the same mechanism than the compiler. C++ templates is a horrendously perverted shadow of what lisp macros are.

    Try Common Lisp some day. It so superior to C++ - it is amazing.

    (...and there goes my karma)

  5. Re:Nice, but maybe irrelevant. by TheRaven64 · · Score: 4, Informative

    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.

    --
    I am TheRaven on Soylent News
  6. Re:Nice, but maybe irrelevant. by Lunix+Nutcase · · Score: 2, 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.