• Masterkraft0r@discuss.tchncs.de
    link
    fedilink
    arrow-up
    42
    arrow-down
    3
    ·
    edit-2
    10 months ago

    As an embedded firmware guy for 10ish years:

    C can die in a fire. It’s “simplicity” hides the emergent complexity by using it as it has nearly no compile time checks for anything and nearly no potential for sensible abstraction. It’s like walking on an infinite tight rope in fog while an earth quake is happening.

    For completely different reasons: The same is true for C++ but to a far lesser extent.

    • colonial@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      10 months ago

      Ahh, the consequences of using the PDP-11 as your abstract machine.

      I find C fun in small doses, but if I ever had to scale up to an actual product, I’d quickly want to off myself from copy-pasting my vector implementation for every different type it needs to contain.

      (Of course, I could commit macro abuse to emulate generics, but… that’s just asking for trouble.)

    • fkn@lemmy.world
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      10 months ago

      I used to be this way about c++ too… But c++17/22 are not the same language as it was 10 years ago… And it definitely isn’t the language most firmware guys get to use it as.

      There is some truly wild shit in the templating system.

      • Masterkraft0r@discuss.tchncs.de
        link
        fedilink
        arrow-up
        2
        ·
        10 months ago

        I’m aware. I write C++17 and I try to be informed what the best praticed are for whatever version of whatever language I’m writing at the moment. But that’s actually a reason to not like C++. It’s painfully backwards compatible and what was good pratice isn’t anymore because now there’s a better one, but that better pratice isn’t in anyway enforced because of backwards compatibility. And also I don’t like templates, generics are superior to me, but that’s a me thing.

        • fkn@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          10 months ago

          I too used to think generics were superior until I learned parameter packs, type traits and SFINAE.