Please create an account to participate in the Slashdot moderation system


Forgot your password?

ISO C++ Committee Approves C++0x Final Draft 375

Randyll writes "On the 25th, in Madrid, Spain, the ISO C++ committee approved a Final Draft International Standard (FDIS) for the C++ programming language. This means that the proposed changes to the new standard so far known as C++0x are now final. The finalization of the standard itself, i.e. updating the working draft and transmitting the final draft to ITTF, is due to be completed during the summer, after which the standard is going to be published, to be known as C++ 2011. With the previous ISO C++ standard dating back to 2003 and C++0x having been for over eight years in development, the implementation of the standard is already well underway in the GCC and Visual C++ compilers. Bjarne Stroustrup, the creator of C++, maintains a handy FAQ of the new standard."
This discussion has been archived. No new comments can be posted.

ISO C++ Committee Approves C++0x Final Draft

Comments Filter:
  • Like a zombie (Score:3, Insightful)

    by russotto ( 537200 ) on Saturday March 26, 2011 @04:59PM (#35624592) Journal

    C++ just keeps on going, eating the brains out of anyone who dares to use it. When template metaprogramming was invented, the language should have been internationally banned by treaty. Now with lambdas, garbage collection, rvalue references, and a host of other features, C++ should be officially classed as a Weapon of Mass Destruction.

  • Re:Question (Score:4, Insightful)

    by Anonymous Coward on Saturday March 26, 2011 @05:01PM (#35624612)

    As someone who has written software using GObject, FUCK YOU.

  • by binarylarry ( 1338699 ) on Saturday March 26, 2011 @05:10PM (#35624682)

    Even naive C++ is much, much, much faster than Python and is even capable of supporting multiple threads.

    It's much faster than C# and slightly faster than Java code as well.

  • Re:Question (Score:1, Insightful)

    by EvanED ( 569694 ) <[moc.liamg] [ta] [denave]> on Saturday March 26, 2011 @05:15PM (#35624722)

    If C++ is cancer to C's something, that something is also cancer. Or maybe AIDS.

    I have a love-hate relationship with C++, but one thing that I more-on-less don't waver on is the fact that I would much rather write in C++ than in C for... basically anything.

  • by PhrostyMcByte ( 589271 ) <> on Saturday March 26, 2011 @05:16PM (#35624730) Homepage
    There was nothing for RedHat to fix -- you were relying on undefined behavior. list's size() complexity is still undefined in C++0x. You're expected to use iterators and empty() when you want defined complexity.
  • by Chemisor ( 97276 ) on Saturday March 26, 2011 @05:36PM (#35624882)

    Yes, you hate C++. We get it. Instead of complaining about it so much, just don't use it, stick to your own favorite language, whatever it may be, and leave C++ alone. There are plenty of us who love C++ and wouldn't give it up for anything. We mind our own business, write great code, and try to avoid complaining about whatever it is you are using. Please try to do the same.

  • by shutdown -p now ( 807394 ) on Saturday March 26, 2011 @05:43PM (#35624932) Journal

    Will they resolve the question of std::list::size() function's speed?

    Yes. From the most recent C++0x FCD, 23.l2.1[container.requirements.general] table:

    Expression: a.size()
    Return type: size_type
    Operational semantics: distance(a.begin(), a.end())
    Assertion/note pre-/post-condition: -
    Complexity: constant

  • by VortexCortex ( 1117377 ) <.moc.edargorter- ... . .xetroCxetroV.> on Saturday March 26, 2011 @06:34PM (#35625280)

    Enough said!


    Incorrect. The year 2011 A.D. is 7DB Hexadecimal A.D. Ergo, if you're going to abbreviate the numeral using the last two digits you should be heralding C++'DB or simply shorten it to C++'B.

    Note: Due to the fact that legacy versions are abbreviated as YEAR mod 100 in radix (base) 10, the new hexadecimal notation should include the a prefix or suffix indicating the radix in use. For quite some time there has existed such a hexadecimal radix prefix in C and C++: 0x

    Hurray for C++ 0xB;
    (Also note the above line does not parse as valid statement in C++, even though the ++ operator actually does take a dummy int parameter as the right-hand-side to differentiate it from the ++C; prefix increment operator.
    operator++(int){ /* WTF! */ };

    For meatball's sake people, even the ++ operator is a kludge in C++? [] ( "C++" translates to "C (with kludges)" to me.)

    Even without any #define macros present, I still can't tell what a single snippet of C++ code is going to do. (Does the simple statement: C++; open a temporary file, and record the number of increments or throw an exception? Should I wrap all such statements in a try / catch block!?) If you haven't studied the entire inheritance graph of the type that the C variable is declared as, there is really no way (beside a debugger) to know what will happen next. (What if a pointer is to a polymorphic class? *my_ptr->operator++(42); Now, it's not supposed to do anything with that "dummy" 42 value, the base type doesn't but a subclass might...)

    Don't get me wrong, I code in C++ every day, and prefer it to C, but it surprises me just how messed up things have been allowed to get because we're shoe-horning in features into an existing syntax instead of just creating a new language that has less kludges.

    int main() {
    int my_var_a( 1 ); //Constructed an int "object" by calling it's "constructor"
    // ^^^ Uh.. OK ints are object-ified now.
    int my_var_b(); // DOES NOT call the int object's empty constructor.
    my_var_b = 10; // ERROR, the previous line declares a function.
    return my_var_a;
    ^^^^^^ Declares a new function in the function/method body WTF? (because C lets you do that, for better or worse... )
    use: int myvar; to "instantiate" a new int "object" using the empty constructor instead... So, why can't I subclass an int? class my_number : public int { ... }; ARGH.

    Look, it's clearly time to stop hacking extra features into the language, or stop letting it be hindered by legacy C conventions / syntax. I think that C++ could be much better than it is if it weren't pandering to C coders... It's too bad that we started down that path with C++, there's far too much time and energy invested to reboot it now.

    I'm glad for some of the new C++ features, but at this point there's not much to celebrate for me -- Doing without for so long has caused us to create our own systems: the C++0x garbage collector is incompatible with my multi-threaded hybrid strategy (pool / slab & heap-like) memory manager (thank Spaghetti Monster, theirs is optional), I already have a ton of code that uses my cross platform multi-threading libraries, we've been using a HashContainer for over 10 years in our company...

    C++0x7DB adoption to us means: "Oh great, they finally got around to standardizing all these things we've needed for years and made ourselves -- It's going to be a headache writing new code that conforms to the new standard while remaining compatible with our current code-base."

    (And there was much rejoicing: "... yay... ")

  • Re:Like a zombie (Score:5, Insightful)

    by Xtifr ( 1323 ) on Saturday March 26, 2011 @07:53PM (#35625820) Homepage

    Or for the projects where having to manage every allocation and deletion is tedious and gets in the way of actually implementing a program.

    you know, for folks that never understood what RAII (Resource Acquisition Is Initialization) is or how to use it.

    C++ offers both dumb pointers (for those rare occasions when you actually need them) and smart pointers, and C++0x will offer vastly improved smart pointers (shared_ptr)--currently available in Boost, and one of the best reasons for using Boost up until now.

    People who insist on writing C++ as if it were a mildly enhanced form of C have no one to blame but themselves for the problems they encounter.

    It is a valid complaint that C++ makes creating dumb (dangerous) pointers so much easier than smart pointers, but then if you use RAII for your classes more broadly, the need for pointers of any type is usually greatly reduced. Why, you can create whole complex structures of trees of lists of sets of strings, modify them wildly on-the-fly, and never once have to worry about pointers or allocation or deallocation.

    There are plenty of reasons to complain about C++. The language is full of warts, and has some really tedious and error-prone corners. But if your complaint is simply about overuse/abuse of pointers leading to memory leaks, Ur Doin' It Rong(tm)!

Thufir's a Harkonnen now.