• 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…