• wim@lemmy.sdf.org
    link
    fedilink
    arrow-up
    37
    arrow-down
    1
    ·
    edit-2
    1 year ago

    Everything is fine within the scope of a college course or project.

    Where C++ breaks down is large, complicated projects where you colaborate with other developers over multiple years.

    I worked in C++ for almost a decade, and while there were a few good projects I encountered, most suffered from one or more of the following problems:

    • C++ has so many parts, everyone picks a subset they think is “good”, but noone seems to fully agree on what that subset is.
    • A side effect of the many possibilities C++ offers to compose or abstract your project is that it allows for developers to be “clever”. However, this often results in code that is hard to maintain or understand, especially for other developers.
    • Good C++ is very hard. Not everyone is a C++ veteran that read dozens of books or has a robust body of knowledge on all its quirks and pitfalls, and those people are also often assigned to your project and contribute to it. I was certainly never an expert, despite a lot of time and effort spent learning and using C++.
    • 257m@lemmy.ml
      link
      fedilink
      arrow-up
      11
      arrow-down
      1
      ·
      edit-2
      1 year ago

      Just use C. It solves all those problens given the most complicated feature is pointers and those hard aren’t to understand.

      • wim@lemmy.sdf.org
        link
        fedilink
        arrow-up
        7
        arrow-down
        1
        ·
        1 year ago

        While C is certainly better for some problems in my experience, it too is very hard to use in large projects with a mix of developers, and it is unsuitable for most higher level applications in most companies.

        I think C has its place in the world still, which is mostly confined low level embedded, kernel space and malware. I do believe that the market segment that used to rely on C++ is today better served by either Go or Rust, depending on the project.

        That said, while I LOVE working with Rust, it suffers from many of the same issues I mentioned for C++ in my comment above when working in a mixed skillset team.

        • 257m@lemmy.ml
          link
          fedilink
          arrow-up
          3
          ·
          1 year ago

          I agree, unless you doing low level stuff where you need absolute control you should use a modern language with proper abstraction just to save time. Most use cases where they use C++ can be replaced with Rust or Go as they aren’t saddled with years tech debt and bloat due to having mantaining backwards compatibility.