8 votes

"Modern" C++ Lamentations

6 comments

  1. [3]
    unknown user
    Link
    I don't know much maths, and I didn't know what Pythagorean Triplets were. Up until I read the C# exame that is, and I have never written C# before. I might have figured it out from the C example...

    I don't know much maths, and I didn't know what Pythagorean Triplets were. Up until I read the C# exame that is, and I have never written C# before. I might have figured it out from the C example if I tried hard enough. I had no chance of reading and comprehending that C++ soup though.

    1 vote
    1. [2]
      unknown user
      Link Parent
      Mark my word, C++-3x will allow one to write code, that is barely distinguishable from Perl one-liners. The Vasa is closer and closer to sinking.

      Mark my word, C++-3x will allow one to write code, that is barely distinguishable from Perl one-liners. The Vasa is closer and closer to sinking.

      1. unknown user
        Link Parent
        Personally, once you get down what context means in Perl (i.e. what $_ and @_ are, and how functions use them), it's way more readable than C++. As someone who only barely knows the syntax of the...

        Personally, once you get down what context means in Perl (i.e. what $_ and @_ are, and how functions use them), it's way more readable than C++. As someone who only barely knows the syntax of the language, when I look at code written in C++, I can't really understand a word. It's like listening to Dutch: it's something like English, but you don't understand nothing from it regardless. Similarly, C++ code apparently looks like a program, but I cannot make out what it really is.

        1 vote
  2. [3]
    dblohm7
    Link
    I consider myself to be a reasonably good C++ programmer who has used metaprogramming off and on, but I agree with the thesis of the blog post. As powerful as many C++ features are, they are also...

    I consider myself to be a reasonably good C++ programmer who has used metaprogramming off and on, but I agree with the thesis of the blog post.

    As powerful as many C++ features are, they are also often inscrutable.

    In fact, I would suggest that the poster-boy for this is the Standard C++ Library itself. A language's standard library implementation should not be that difficult to read and understand, IMHO.

    1 vote
    1. [2]
      unknown user
      Link Parent
      Genuine question (as I don't do a lot of C++): what are the most difficult to understand parts of the stdlib? So far the thing that gave me the most headache, surprisingly, was the locales...

      Genuine question (as I don't do a lot of C++): what are the most difficult to understand parts of the stdlib? So far the thing that gave me the most headache, surprisingly, was the locales library. Mostly because the relationships between the classes weren't obvious.

      1. dblohm7
        Link Parent
        I would say that lots of the "original" C++ standard library is where the messiness lies. But if you look at the implementation of the standard library, even the newest library features are......

        I would say that lots of the "original" C++ standard library is where the messiness lies.

        But if you look at the implementation of the standard library, even the newest library features are... kind of a mess to understand.

        1 vote