What – if anything – have we learned from C++?

Sign in to queue

Description

What is the essence of C++? Why did it succeed despite its well-understood flaws? What lessons - if any - can be applied to newer languages?

Themes: Social and technical factors. Resource management. Generic programming. The importance of being inefficient. The importance of syntax. How (not) to specify a language. Standardization and compatibility. And no, I don't plan to condemn C++ - it is still the best language around for a lot of things, and getting better. It just isn't anywhere near perfect (even of its kind) or the best at everything - and was never claimed to be.

Tag:

C++

Day:

1

Embed

Download

The Discussion

  • User profile image
    David Glaubman

    This was a great event. Will the slides also be posted somewhere?

  • User profile image
    Charles

    @David Glaubman:Hi David. Glad you enjoyed it!

    We are trying to get all the slides from speakers, but I can't promise that we will yet... I suspect in time, we'll have them all and they will be available here, just like the video presentations.

    Charles

  • User profile image
    fpelliccioni

    Does anyone know what Bjarne said at 31:55?
    "ECMA is the way you can ???? by your own"

  • User profile image
    Anonymous

    @fpelliccioni:
    "ECMA is the way you can basically buy your own."

  • User profile image
    Deactivated User

    Particularly loved the improvements coming with C++14, the try block... The next most noisy keyword for me is auto.

  • User profile image
    fpelliccioni

    @VSChawathe:The try block?

  • User profile image
    ldonati

    What about the

    std::accumulate(seq,{});

    at 0:59:55?

    Is this new c++14 syntax?
    Pretty good if it's true.

    Does anybody know the state of Concepts? Are they final/officially coming?

    Also when Dr. Stroustrup says "you can download the implementation", what's he referring to?

  • User profile image
    Bjarne

    Here: http://concepts.axiomatics.org/~ans/

  • User profile image
    chiragnayyar

    this is very informative ....

  • User profile image
    Thornik

    From C++ experience I learn that there is a lot of stupid cows who NEVER apply brains! They just follow the first cow who mooing "C++ is cool".
    In reality C++ has so much stupid constructions that nobody will select it for software! It's like car driving on C4-explosion - some kilos you drive, but one happy moment you just exploded on meat pieces and that's it! Good luck, suiciders!

  • User profile image
    ldonati

    Thanks for the link! I hope Concepts will get into the standard as soon as possible. Another step wich in my humble opinion is needed for generic programming is better integration between inheritance-virtual functions and templates.

    As for now it's not always easy to switch from a paradigm to the other or to integrate the two happily

  • User profile image
    ldonati

    Move was a great and needed addition to the standard too. It feels natural and many languages will envy this feature.
    Also sometimes using other languages i really miss the rigour and clarity of C++. Knowing if i'm copying things, if i'm referencing things, knowing if and when something gets destroyed, and optimize (if needed) bit per bit.

  • User profile image
    Brian m

    Interesting talk, nice to know the history, loved his comment about auto! It's the one feature I have always wanted in c++, from the earliest versions. Standard committees!

  • User profile image
    Not Available

    Hi,

    Can the sizes of the videos be made smaller? Are the iPhone / Android ones good for viewing on laptop?

    Thanks,

  • User profile image
    phil7

    A little bit offtopic:

    On slide #31 there is a little code snippet containing:

    auto p = find_if(vs.begin(), vs.end(), [](auto x) { x < "Griffin" });

    Bjarne said this is valid C++11 code.

    Using the Microsoft Visual Studio 2013 C++ compiler I get the error message:

    error C3533: 'auto &': a parameter cannot have a type that contains 'auto'

    It seems that Microsoft is still not fully C++11 compliant. Does anybody know how this kind of type deduction is called and where I can find it on the C++ roadmap for Visual Studio?

  • User profile image
    ehsan

    Is there any English subtitle available for the video?

  • User profile image
    Bjarne

    phil7: That's C++14; for C++11 use string& instead of auto

  • User profile image
    Matt_PD

    @Bjarne: I have a question -- or two :)

    Around the 22 minute mark (in the systems panel) you've mentioned that it's hard to simplify complicated programming languages while maintaining backward compatibility. Afterward, there's been an interesting discussion of going beyond code analysis -- with automatic code transformation tools for mechanically-assisted code modernization / rejuvenation.

    I'm wondering, what are your thoughts on Clang C++ Modernizer in this context?
    // "clang-modernize is a standalone tool used to automatically convert C++ code written against old standards to use features of the newest C++ standard where appropriate."
    // http://clang.llvm.org/extra/clang-modernize.html

    The project was featured in the following LLVM Project blog post (and presented at Going Native 2013 by Chandler Carruth):
    http://blog.llvm.org/2013/11/google-summer-of-code-c-modernizer.html

    As a follow-up, in the context of incremental / user-controlled (opt-in) deprecation, would it be possible (and make sense) to introduce (to the Standard) features akin to restrictions and profiles in Ada?

    For instance, the Ravenscar profile is one example:
    http://en.wikipedia.org/wiki/Ravenscar_profile

    Perhaps some day we could have `No_Explicit_Heap_Allocation` (preventing raw `new` and `new[]` in a given translation unit)?

    /* One could go even further and prevent (at compile time) unchecked access (perhaps, and this is just thinking out loud, something like using `at` member function instead of `operator[]` for translation units that opt in; although one would have to consider linkage, ABI compatibility, and further interoperability issues beforehand):
    https://gcc.gnu.org/onlinedocs/gnat_rm/No_005fUnchecked_005fAccess.html#No_005fUnchecked_005fAccess */

    This could also help in as an automatic coding style enforcement -- right now we need to rely on manual adherence (or use non-standard extensions / LINT tools, which can vary from workplace to workplace) to a coding standard (for instance, JSF AV C++ coding standards forbid exceptions -- with compile-time restrictions this rule can be verified by the compiler).

    More information:
    http://en.wikibooks.org/wiki/Ada_Programming/Pragmas/Restrictions
    http://en.wikibooks.org/wiki/Ada_Programming/Pragmas/Restrictions/No_Obsolescent_Features
    https://gcc.gnu.org/onlinedocs/gnat_rm/Standard-and-Implementation-Defined-Restrictions.html#Standard-and-Implementation-Defined-Restrictions

  • User profile image
    golnazal

    @ehsan: yes! In the web player there is a cc button that gives you English subtitles as well as 12 other languages.

Add Your 2 Cents