1. 17
  1.  

  2. 1

    I’m curious if the author used C++11 and later since this was written and if their opinion changed.

    1. 2

      Well they haven’t exactly removed much from the language, have they?

      1. 3

        That’s why the article should be at least 2x longer ;)

        OTOH, adding some new features can deprecate old ones, i.e. adding an std::expected<T, E> can actually produce code that doesn’t use exceptions (not that I’m saying exceptions should be deprecated; they have their uses, just don’t use them as a substitute for return false). So adding stuff can make things better.

        1. 1

          Of course adding stuff can make things better. Nobody on the C++ standards committee added features to make things worse. It’s however undeniable that the additions have made a large language even more gigantic and harder to learn.

      2. 1

        As someone who is not too familiar with the details of C++11 and C++17, did they address any of the issues that the author raised?

        1. 2

          No.

          Every serious C++ project I’ve worked on has banned or heavily frowned upon the STL and most language features, and C++11/14/17 didn’t change that. Each version brings a few nice things but most of it is unusable.

        2. 1

          Looks like they wrote a post about what they would like to see in a new C++ replacement and C++11 and over hit some of the points. https://apenwarr.ca/log/20100721

          However, they think templates are awful and they should bad about that.

        3. 1

          I don’t share the author’s confusion about what C++ member pointers are supposed to be. He writes “Since you know ‘this’ at the time you create the function pointer…”, but the purpose of a pointer-to-member is to capture the selection of one particular member of a class, that can later be applied to any instance of that class. E.g. in a 3D app you could take a pointer to Point::x or to Point::y.

          To do the same thing in C, you might use offsetof(), or in either language you might keep the coordinates in an array and merely store the index. In a dynamic language, you’d just write a small lambda, e.g. var x_coords = points map {v.x}.

          On the other hand, I agree with the criticism of std::map<>::operator[], and that operator[]= would have been a useful addition to C++03.