1. 5
  1.  

  2. 4

    You aren’t forced to use the new c++ features. You can continue to write as you have always written. I think the core complaint is that OTHER people are now writing c++ that looks like - HORROR! - Python. If this was the 1980s and the only way to learn C++ was to pore over a book from end-to-end, ok. But it’s the 21st century! We have the internet! There are online references which have example code snippets to go with each C++ concept or standard library class. A quick web search will get you any concept that you like.

    Taking the example used in the article, I LOVE the range based for loops. It makes it less text to read. Don’t like auto, fine, use explicit typing. A modern IDE will still do code intelligence for you on auto variables, don’t forget and the compiler, of course, will keep you on the straight. You may worry about unfortunate implicit conversions, and then, yes, you should be explicit.

    I’m not convinced all this griping about the size of C++ and all these “modern” features is not a bit of conservatism run amuck. Especially with the new memory features which allow us to avoid bare pointers.

    Sorry for my wall of text. Just a long time C++ fan here who’s a big fan of the new standard.

    A side note on the lego pictures

    1. It’s probably a result of what I’m used to, or some pleasant memories of childhood, but I too miss the “ugly” blocks of my childhood. It wasn’t ugly, because in my imagination all those knobs weren’t making my spaceship ugly - they were potentials for expanding my spaceship even more.
    2. That new spaceship looks like a rebuild of the “Voyager” set (6929) and I find it awesome to see that old computer block unchanged in the new set
    1. 5

      The new C++ features are execllent. The problem is the legacy of bad defaults and backward compatibility at all costs. This is probably the right decision overall, but it makes for an uglier language. I would also point out that you do pay for features that you do not use. Why? Well it might be used by code that you call, triggering weird behavour (e.g. const casts) and it makes tooling considerably hard to build (see Clang’s code complexity).

      1. 3

        I have three comments:

        1. I think it’s natural for any language to eventually buckle under the weight of Amdahl’s law, which in this case is making common idioms faster to write and recognize.

        2. The author seems to simultaneously criticize modern C++ for having too many ways to do something (as in the vector insert example), but also criticizes modern C++ for attempting to make idioms that guide you towards a few ways to do something. In that sense, I’m not sure which he’s arguing for/against.

        3. I agree having too many syntactical features/sugars can create cognitive overhead (one of my pain points with learning Haskell), and I assume that’s why the community has rallied behind guidelines like: https://github.com/isocpp/CppCoreGuidelines

      2. 3

        std::enable_if does kinda suck. But isn’t that why constexpr if was added to C++17? It’s both more elegant and takes less mental energy to grok.