Stop comparing programming languages

  • Python is versatile
  • JavaScript is powerful
  • Ruby is elegant
  • C is essential
  • C++
  • Java is robust
  • OpenStars@discuss.online
    link
    fedilink
    English
    arrow-up
    11
    ·
    5 months ago

    What is C essential for anymore these days? Genuine question btw.

    I thought C++ was essential for microprocessor control, but that it depends and sometimes I gather people use C instead, but not always.

    Use the language that the company hires you to know:-).

      • Agrivar@lemmy.world
        link
        fedilink
        arrow-up
        6
        ·
        5 months ago

        Inertia is a mofo. I did embedded programming for industrial automation almost thirty years ago, building upon and expanding an existing nightmare of C code… and I bet there’s still some of mine running something out there to this day.

    • whotookkarl@lemmy.world
      link
      fedilink
      arrow-up
      16
      ·
      5 months ago

      Pretty much all of the command line coreutils programs I use daily are in C; cd, ls, pwd, touch, rm, etc. If I want to write some small utility I’ll usually reach for a scripting language first like bash python ruby etc, but if it needs to be small and fast I’ll use C instead.

      • BatmanAoD@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        5 months ago

        Genuine question: if you’re writing a new CLI utility, why not Rust? This is arguably where Rust has most excelled, most famously with ripgrep.

    • MiltownClowns@lemmy.world
      link
      fedilink
      arrow-up
      12
      ·
      5 months ago

      Used to be embedded systems mostly. Microwaves and the like. Although with the advance of the smart home I don’t know I’d that’s still true.

      • odium@programming.dev
        link
        fedilink
        arrow-up
        3
        ·
        5 months ago

        The majority of microwaves, fridges, etc. Still don’t connect to WiFi. It’s mostly the high end ones which do.

      • OpenStars@discuss.online
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 months ago

        It isn’t just a language, but it is a language - as it eventually gets around to saying, but it starts off by saying that it isn’t, then later corrects itself to say that it is, etc. I feel like the focus of this ignores the historical context of what C was written to be for - at the time there was like Assembly, BASIC, Fortran (?), other long-dead languages like was it A and/or A* or whatever, there was a B language too! (developed by Bell Labs, if Google can be trusted these days), etc. - and C was developed to be better than those. So saying that like it lacks type conversions is very much missing the point - those were not invented yet. A lawn mower also lacks those, but it’s okay bc it doesn’t need them:-) I am probably nit-picking far too many points, I suppose to illustrate that the style of the article became a hindrance to me to read it b/c of those reasons. But thank you for sharing regardless.

        • BatmanAoD@programming.dev
          link
          fedilink
          arrow-up
          2
          ·
          5 months ago

          I don’t really like the title either, but the article does demonstrate how unfortunate it is that we’re effectively locked in to using the ABI at some level of nearly every piece of software.

          That said, there definitely were languages with better type systems prior to the invention of C. Pascal is a frequently-cited example.