Slashdot Mirror


Bjarne Stroustrup Announces the C++ Core Guidelines

alphabetsoup writes: At CppCon this year, Bjarne Stroustrup announced the C++ Core Guidelines. The guidelines are designed to help programmers write safe-by-default C++ with no run-time overhead. Compilers will statically check the code to ensure no violations. A library is available now, with a static checking tool to follow in October.

Here is the video of the talk, and here are the slides.The guidelines themselves are here.

8 of 262 comments (clear)

  1. Bjarne should not be writing that by Carewolf · · Score: 3, Insightful

    He has a connecting to all the features he put into C++ and any coding guidelines should include thing that should not be used. First among those are exceptions, unfortunately Bjarne has never wanted to admit C++ exceptions were a mistake.

  2. Sad, really by jandersen · · Score: 5, Insightful

    I think it is sad, looking around on the responses so far, to see, yet again, that the overwhelming response to this is to jeer at anything that is beyond people's comprehension. I guess what it boils down to is, that far too many who call themselves coders can't be bothered to sit down and work out a detailed plan before barging ahead. You get nothing but trouble from OOP if you think in terms of simple scripts, and that is particularly true of C++.

    1. Re:Sad, really by myrdos2 · · Score: 4, Insightful

      In short, I suggest that the programmer should continue to understand what he is doing, that his growing product remains firmly within his intellectual grip. It is my sad experience that this suggestion is repulsive to the average experienced programmer, who clearly derives a major part of his professional excitement from not quite understanding what he is doing. In this streamlined age, one of our most undernourished psychological needs is the craving for Black Magic and apparently the automatic computer can satisfy this need for the professional software engineer, who is secretly enthralled by the gigantic risks he takes in his daring irresponsibility. For his frustrations I have no remedy......

      -- Edsger W. Dijkstra

      I love this quote, and I say that as a C++ programmer. It falls in with my own philosophy, which is that the more complicated something is, the less likely people will get it right. And C++ is extremely complicated. It's not the OO design that necessarily trips people up, it's the sheer amount of minutiae you need to remember and the care you must take not to do something stupid.

  3. Re:As always, guidelines are for beginners by 140Mandak262Jamuna · · Score: 4, Insightful

    Just like "don't use goto", or "don't use threads", etc., these guidelines and recommendations are really great to prevent beginners from making hard to spot errors, but all those variations and features exist for a reason and have a use.

    Nobody uses GOTO anymore. With event driven programming and call back functions, it all spaghetti code strewn with COME FROM statements, effectively.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  4. Re:Should file not found always be a fatal error? by Seq · · Score: 3, Insightful

    You just need to catch the crash. Though it would be helpful if we could pass along some additional information about the crash..

    Oh. Hmmm..

    --
    -- Seq
  5. Re:Wait what? by Darinbob · · Score: 4, Insightful

    If you're using a professional code base, then you're better off NOT using all the latest features just because they're new! Sure, learn about the new language features, but that doesn't mean you should embrace them. Let other people be the guinea pigs.

  6. Re:Instrumenting c++ to behave like Rust by Pinky's+Brain · · Score: 3, Insightful

    Seasoned professionals have given us decades worth of mostly unnecessary buffer overflows.

  7. Re:As always, guidelines are for beginners by Darinbob · · Score: 3, Insightful

    I hate patterns. They're too much like verses from a religious text, because I've run across people who seem unable to understand your code unless it uses patterns from the official pattern Bible. Holding a conversation with them can involve being interrupted every few minutes with "oh, that's a FurblingFunctorFactory, why didn't you say so?" If you don't keep a close watch they'll go and changing existing/working code to rename classes to indicate what pattern they are.