• SinTan1729@programming.dev
    link
    fedilink
    English
    arrow-up
    20
    ·
    edit-2
    3 hours ago

    My first ever big boy language was C++ (after Basic, and Logo, does anyone remember that lol). I was in middle school, tried to self-learn from learncpp.com, only to realize that I had mostly learned C, with cin-cout instead of printf-scanf. So I just decided to migrate to C. Nowadays, I mostly code in Rust, Go, and Python. But my experience with C has been extremely helpful. Can’t say the same about C++ though.

    • LedgeDrop@lemmy.zip
      link
      fedilink
      arrow-up
      8
      ·
      2 hours ago

      C++ is useful for learning object oriented programming: Describing what really happens in constructors and destructors, the pros/cons of reference counting and how it actually works (using std::unique_ptr)

      These are things that most modern languages try to hide/abstract away, but the underlying problems and limitations never go away, but with C++ you’ll have a better understanding of why they happen.

      However, if you go down the rabbit hole of Template Metaprogramming, I agree with the original post: it takes decades to learn and really only useful exploitable in C++.

      • Feyd@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        19 minutes ago

        How does unique_ptr teach reference counting? It’s just a way to interface with RAII and move semantics

      • SinTan1729@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 hour ago

        I’ve always preferred the functional approach to programming, so OOP never really intrigued me. That’s one of the reasons why I never liked C++ or Java, but instantly fell in love with Rust. It lets me do a lot of functional style programming, while still being somewhat practical. (I’m looking at you, Haskell.)

        • copacetic@discuss.tchncs.de
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 minute ago

          Quite a while ago, I wrote this to document my understanding what OOP actually is.

          This sentence at the end is interesting:

          On the other hand it sounds unlikely that there will be a popular language without object-oriented influences some day, so at least minimal syntax-level support is desirable.

          Rust was published like one year later and it can be considered popular by now. Does Rust support OOP via traits? Kind of yes, but so does Haskell with typeclasses.

  • xav@programming.dev
    link
    fedilink
    arrow-up
    47
    ·
    6 hours ago

    I have decades of C++ experience. I have never met any C++ developer who hasn’t shot himself in the foot regularly with this damn language.

    • Valmond@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      29
      ·
      6 hours ago

      But it’s the funniest language IMO, you can do frigging anything with it.

      Which is why it causes problems of course.

      • Lumisal@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        1 hour ago

        I need to find the nut meme about programming languages again

        Edit: Well this meme at least gets the gist of it

  • dragnucs@lemmy.ml
    link
    fedilink
    arrow-up
    6
    ·
    4 hours ago

    There is a difference between learning a language and be productive with it, and with mastering a language. Being a good software developer is another thing.

  • red_tomato@lemmy.world
    link
    fedilink
    arrow-up
    40
    ·
    7 hours ago

    The problem with C++ is that it has so many odd quirks that are difficult to learn. Sometimes these quirks are addressed - at the expense of adding new stupid quirks you need to learn.

  • copacetic@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    10
    ·
    6 hours ago

    To be clear, the language itself is usually not the big part. You also have to learn the eco-system, libraries, packaging, debugging, etc.

    (C++ is still a very “comprehensive” language though)

  • mercano@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    6 hours ago

    C and C++ ask the programmer to deal with things themselves that other more modern languages do for you in the language runtime Memory management would be the big one. It’s more to wrap your head around, but if you can do it, there’s potential for more performance. In my mind, it comes down to a trade off between development time versus CPU time, and CPU time is a lot cheaper these days.

    Signed, a Java dev

  • lacethespace@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    ·
    5 hours ago

    I spent few years using it professionally and mentoring others, but never felt comfortable with it. Small eternities spent fighting the language constructs and solving typing puzzles. My take away is that I could just barely fit the C++ in my head and then there’s no room for anything else. I’m done with it for good.

  • xav@programming.dev
    link
    fedilink
    arrow-up
    4
    arrow-down
    4
    ·
    4 hours ago

    I have decades of C++ experience. I have never met any C++ developer who hasn’t shot himself in the foot regularly with this damn language.

    • anon_8675309@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      39 minutes ago

      Developers are the problem. They get language feature envy and so the language they use gets pushed to include the new feature. It’s why a lot of devs hate languages like Go because Go is highly resistant to change. So languages like C++ and C# end up with so many features you can’t possibly know or master all of them.

      For some fucking reason devs don’t want to use multiple languages.

  • SinTan1729@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    2
    ·
    4 hours ago

    My first ever big boy language was C++ (after Basic, and Logo). I was in middle school, tried to self-learn from learncpp.com, only to realize that I had mostly learned C, with cin-cout instead of printf/scanf. So I just decided to migrate to C. Nowadays, I mostly code in Rust, Go, and Python. But my experience with C has been extremely helpful. Can’t say the same about C++ though.

  • xav@programming.dev
    link
    fedilink
    arrow-up
    2
    arrow-down
    7
    ·
    6 hours ago

    I have decades of C++ experience. I have never met any C++ developer who hasn’t shot himself in the foot regularly with this damn language.

  • xav@programming.dev
    link
    fedilink
    arrow-up
    1
    arrow-down
    10
    ·
    6 hours ago

    I have decades of C++ experience. I have never met any C++ developer who hasn’t shot himself in the foot regularly with this damn language.

  • xav@programming.dev
    link
    fedilink
    arrow-up
    1
    arrow-down
    10
    ·
    6 hours ago

    I have decades of C++ experience. I have never met any C++ developer who hasn’t shot himself in the foot regularly with this damn language.

  • xav@programming.dev
    link
    fedilink
    arrow-up
    3
    arrow-down
    9
    ·
    6 hours ago

    I have decades of C++ experience. I have never met any C++ developer who hasn’t shot himself in the foot regularly with this damn language.