Slashdot Mirror


Bjarne Stroustrup Reflects On 25 Years of C++

eldavojohn writes "Today roughly marks C++'s first release 25 years ago when about six years of Bjarne Stroustrop's life came to fruition in the now pervasive replacement language for C. It achieved ISO standardization in 1998 and its creator regularly receives accolades. Wired's short interview contains some nice anecdotes including 'If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it' and 'I'll just note that I consider the idea of one language, one programming tool, as the one and only best tool for everyone and for every problem infantile. If someone claims to have the perfect language he is either a fool or a salesman or both.' There's some surprising revelations in here, too, as his portable computer runs Windows."

6 of 553 comments (clear)

  1. Re:C++. lol. by grub · · Score: 4, Informative


    I don't know why you were modded as a troll. FTA itself:

    Stroustrup: I'll just note that I consider the idea of one language, one programming tool, as the one and only best tool for everyone and for every problem infantile. If someone claims to have the perfect language he is either a fool or a salesman or both.

    --
    Trolling is a art,
  2. Doom by Purity+Of+Essence · · Score: 5, Informative

    So, for me, the main satisfaction comes from interesting and challenging applications that just might not have been done without C++, or possibly been delayed for many years for lack of a language suitable for demanding real-world applications. ... Videogames like Doom

    Doom was written in C, not C++.

    --
    +0 Meh
  3. Re:Reflect? by ari_j · · Score: 4, Informative

    Ultimately, the only good try/catch 22 joke is the one about not making one.

  4. Re:the best. by The+Moof · · Score: 5, Informative

    std::string somefunction(){}

    The fact that such a thing can compile is a glaring error.

    Here's something interesting: Visual Studio wouldn't compile it for me (error C4716, complains about no return value, as you had expected), but it compiled on my FreeBSD box without any complaints. Perhaps this is more of a compiler problem than a C++ problem.

  5. Re:the best. by HonIsCool · · Score: 5, Informative

    What you are saying is not correct. The C++ standard says:

    "6.6.3 The return statement
    [...]
    A return statement without an expression can be used only in functions that do not return a value, that is, a function with the return type void, a constructor (12.1), or a destructor (12.4).
    [...]
    Flowing off the end of a function is equivalent to a return with no value; this results in undefined behavior in a value-returning function."

    It is perfectly legal for a compiler to issue a warning for this or even an error. I consider a compiler refusing to compile it a superior compiler.

    --
    "Give me six lines of C++ code written by the most competent programmer, and I will find enough in there to hang him."
  6. C++ actually faster than C by pslam · · Score: 4, Informative

    Except C++ is not slower than C... It's actually equally fast, and can give a lot of performance optimizations with a fraction of the code needed to do the same on C.

    It's even better than that. There's extra type checking and tighter rules on aliasing in C++ (unless you turn them off), so it can actually generate faster code. If you trivially convert a C program to the slightly less relaxed rules of C++, you should expect at least the same performance (if not, file a bug with your compiler provider), and often better.

    I agree with the sentiment that anyone who thinks C++ is slower then C understands neither. It perfectly demonstrates their lack of understanding.