• FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    19
    arrow-down
    2
    ·
    1 day ago

    I think it’s just because it is always recommended as an “easy” language that’s good for beginners.

    The only other thing it has going for it is that it has a REPL (and even that was shit until very recently), which I think is why it became popular for research.

    It doesn’t have anything else going for it really.

    • It’s extraordinarily slow
    • The static type hints are pretty decent if you use Pyright but good luck convincing the average Python dev to do that.
    • The tooling is awful. uv is a lifesaver there but even with uv it’s a bit of a mess.
    • The package system is a mess. Most people just want to import files using a relative path, but that’s pretty much impossible without horrible hacks.
    • The official documentation is surprisingly awful.
    • Implicit variable declaration is a stupid footguns.

    The actual syntax is not too bad really, but everything around it is.

    • Vulwsztyn@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      19 hours ago

      syntax is bad for list operations, also there are situations where you need to count the number of parentheses you closed, which wouldn’t happen of you were able to use fluent interfaces

    • namingthingsiseasy@programming.devOP
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      1 day ago

      I think it’s just because it is always recommended as an “easy” language that’s good for beginners.

      The only other thing it has going for it is that it has a REPL (and even that was shit until very recently), which I think is why it became popular for research.

      If that’s the case, then why didn’t Javascript take its place instead? It’s arguably even better at Python in both of those areas…

      • FizzyOrange@programming.dev
        link
        fedilink
        arrow-up
        4
        arrow-down
        2
        ·
        20 hours ago

        I think Python is superficially easier since you don’t have to declare variables, printing is a little easier, etc. And in some ways it is actually easier, e.g. arbitrary precision integers, no undefined, less implicit type coercion.

        But I agree JavaScript is generally a better choice. And it is actually more popular than Python so…