• @sus@programming.devOP
    link
    fedilink
    343 months ago

    bonus points if you’re using a statically typed language but the library uses extensive metaprogramming seemingly for the sole purpose of hiding what types you actually need

  • JackbyDev
    link
    fedilink
    English
    83 months ago

    This is probably my biggest complaint about trying to learn Python past the beginner level and into intermediate and beyond. This is also one of my strongest arguments in favor of static type systems over dynamic ones.

  • @sbv@sh.itjust.works
    link
    fedilink
    English
    543 months ago

    I love shitting on Python, but I feel like all those problems are present in libraries for other languages as well. There’s a tonne of that crap for JS/TS.

    Similarly, I find a fair number of Rust crates (that I want to use) have virtually no doc or inline examples, and use weird metaprogramming that I can’t wrap my head around.

    • The Bard in GreenA
      link
      fedilink
      English
      493 months ago

      Are we living in a world in which the JS/TS ecosystem is the yardstick by which we measure well written code? I mean… Wait a minute! I figured it out! This is the Bad Place!

    • Ephera
      link
      fedilink
      223 months ago

      I mean, if we’re talking about all those problems, the no-type-annotations issue is rather specific for Python, JS/TS and Ruby.

      But in general, I feel like there’s somewhat of an old world vs. new world divide, which happened when package registries started accepting libraries from everyone and their cat.

      In C, for example, most libraries you’ll use will be quite well-documented, but you’ll also never hear of the library that Greg’s cat started writing for the niche thing that you’re trying to do.

      Unfortunately, Greg’s cat got distracted by a ball of yarn rolling by and then that was more fun than writing documentation.
      That’s the tradeoff, you get access to more libraries, but you just can’t expect all of them to be extremely high-quality…

    • @Pacmanlives@lemmy.world
      link
      fedilink
      93 months ago

      You should look at some old Perl or C code. I have even seen some shell code that makes me want to bash my head in till death with an IBM Model M Keyboard

    • Preston Maness ☭
      link
      fedilink
      English
      43 months ago

      Similarly, I find a fair number of Rust crates (that I want to use) have virtually no doc or inline examples, and use weird metaprogramming that I can’t wrap my head around.

      Is it really a true rust crate if it doesn’t contain at least one inscrutable macro?

  • @mvirts@lemmy.world
    link
    fedilink
    43 months ago

    And now we have free threads so I can’t say at least you don’t have normal concurrency problems 🤣

  • @dudinax@programming.dev
    link
    fedilink
    53 months ago

    Rust crates have the second and third problems.

    Rust at least has type annotation.

    The type has private fields. There’s no constructor. There’s no implementation of the From trait except on itself. You can’t find a function anywhere that returns the type.

  • @Evil_Shrubbery@lemm.ee
    link
    fedilink
    7
    edit-2
    3 months ago

    Using cryptic parameter names is just nonsense when you can obviously use lewd cryptic parameter names instead.

  • @kaffiene@lemmy.world
    link
    fedilink
    English
    33 months ago

    I really like Python. The only thing I don’t want to do with Python is support a large code base. Lack of strict typing makes refactoring awful

  • @Reptorian@programming.dev
    link
    fedilink
    1
    edit-2
    3 months ago

    I’m just glad I have other options than just Python. Am not afraid of writing my solutions either. I rarely use Python these day.