Python is the most popular programming language and beloved by many. However I can’t understand why (this is still the case in 2024).

Here are my main gripes with it:

  • It is slow, performance intensive tasks have to be offloaded to other languages, which makes it complicated to analyse. Moreover I wonder how many kwH could have been saved if programms were written in more performant languages. (and there are better alternatives out there)
  • The missing type system makes it easy to make errors, and the missing compiler makes it hard to catch them
  • It has no linear algebra built in, so you always have to convert things to numpy arrays, which is quite annoying
  • Managing virtual environments and pip packages feels overly complicated

I guess much comes down to personal, but I just can’t understand the love for python.

  • Admiral Patrick@dubvee.orgM
    link
    fedilink
    arrow-up
    5
    ·
    9 months ago

    Sounds like you’re just using the wrong tool for the job, then.

    It’s like you’re trying to drive a screw in with a hammer.

    • remotelove@lemmy.ca
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      9 months ago

      Not only can you sometimes drive a normal wood screw with a hammer, they also make hammer drive screws. And nails that screw…

      Also, every tool is also a hammer.

      (Sorry. I had to pick a little bit of fun at that analogy.)

    • scharf_2x40@lemmy.worldOP
      link
      fedilink
      arrow-up
      2
      ·
      9 months ago

      No I mean, Python is definitely the most used language in scientific computing, but yeah, I would use something else if I could.

      • XTL
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        9 months ago

        Why would it be better or important in any way to have that be a “language feature” instead of a library?

        If it can be a library, it’s obviously not something that needs to be a part of the language. Most uses have absolutely no need for linear algebra. Why drag on useless baggage and bloat?

        • scharf_2x40@lemmy.worldOP
          link
          fedilink
          arrow-up
          2
          ·
          9 months ago

          Yeah that point was not entirely accurate. What I meant was, that a np.array and a list don’t work together. Coming from julia and matlab it just does not make sense to me, why I can’t use a function written for a list for a np.array even if they basically represent the exaxt same thing.

          Julia for example hast linalg as a module but functions work on lists with no problem.