• drspod@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    2 months ago

    The article seems like a rebuttal to a strawman argument to me.

    You’d have to be pretty oblivious (or a non-software engineer) to express the premise of this article as an opinion.

    The only interesting part to me was asking specifically what types of functionality are being delegated to libraries instead of (re-)implemented in the program itself. The author should ask this same question of some Rust and Javascript programs of similar size, so we can see if left-pad in Javascript is just a meme or if programmers armed with convenient package managers are delegating trivial one-liners to external libraries.

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      Speaking as a Rust programmer, I feel like the biggest hurdle to using libraries in place of one-liners, is finding out about those libraries. At some point, you’re going to search “How to pad string in Rust/JS?”. And then StackOverflow, or an LLM mindlessly parroting it, will tell you to use leftpad, or well, in the case of Rust, this functionality is actually in the std lib.

      So, I’d say, it actually depends a lot on the culture of a given programming language, whether the use of a library will be the top response or a short code snippet.
      And I do feel like JS is in somewhat of a special spot in this regard, having been designed by committee, so there’s some really silly omissions from the std lib. And it’s also often used by hobbyists, who just dish out a project and then move on, never having to deal with the dependency hell that follows…