• escapesamsara@discuss.online
    link
    fedilink
    arrow-up
    35
    arrow-down
    12
    ·
    1 year ago

    Python is legitimately the best language by far for the vast majority of non-performance critical tasks, and most tasks that need to be developed for are not performance critical.

    • foo@withachanceof.com
      link
      fedilink
      arrow-up
      17
      ·
      1 year ago

      Heh, I was about to comment how my hot take is that Python is overrated. It’s… fine and I don’t really have anything against it for the most part, but I greatly prefer Ruby to Python.

      I’m speaking purely about the language itself here, not any libraries available for it (since someone will always point out how great Python is for data work).

      • fubo@lemmy.world
        link
        fedilink
        arrow-up
        9
        ·
        edit-2
        1 year ago

        My impression at the time was that Ruby and Python both caught on with people who were ready to be done with Perl.

        And, later, that Go set out to be a replacement for Java, but ended up being a replacement for Python for people who were ready for type checking and built-in multithreading.

    • CMahaff@lemmy.world
      link
      fedilink
      English
      arrow-up
      12
      ·
      1 year ago

      Oh man, I actually like the language, but you made me think of my own hot take:

      Python has inexcusably poor docs.

      Just a smattering of examples, which aren’t even that good, while failing to report key information like all the parameters a function can take, or all the exceptions it can throw. Any other popular language I can think of has this locked down and it makes things so much easier.

      • TerrorBite :veripawed3:@meow.social
        link
        fedilink
        arrow-up
        6
        ·
        1 year ago

        Python has had syntax support for type annotations for a while now. The Python runtime doesn’t enforce the typing at all, but it can be enforced by a linter or by your IDE. And I believe you can introspect the type annotations at runtime, because they are actually part of the syntax.

        There’s even an alternative way of doing type annotations through specially formatted comments, just in case you might still need to write code that is backwards compatible with Python 2.

        @escapesamsara @navi @programming

    • Lil' Bobby Tables@programming.dev
      link
      fedilink
      arrow-up
      7
      ·
      1 year ago

      Absolutely. I don’t know if it’s the absolute best, but I very much agree for using a high-level language for high-level tasks. There’s a reason they’re designed that way—you’re not burning Hertz, dang it; you’re burning seconds, and you’re burning them either way!

      That said, please, please don’t use it for performance critical code.

      • AggressivelyPassive@feddit.de
        link
        fedilink
        arrow-up
        6
        ·
        1 year ago

        I’d argue, 99% of the code written is not performance critical in the sense that a different language could help. Either performance really doesn’t matter that much, or it’s an IO problem. You can process as fast as you want, if the DB takes 100ms to respond, you won’t get below 100ms overall.

    • r1veRRR@feddit.de
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      For bigger projects, anything with MANDATORY types is a must for me. Optional, not compiler checked hinting doesn’t cut it.

      Not that i hate the language, but I do hate the tooling around it. I don’t think I’ve ever had a pleasant experience with setting up a Python project. And all the data stuff is just wrappers for code in other languages, making the packaging story even uglier, even harder.

      • MajorHavoc@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        1 year ago

        You’re right now to compromise on this, but you can give yourself mandatory types in Python, using MyPy, if that’s your only issue with it.*

        Because you don’t need elegant subprocess handling, intuitive reliable logging, and don’t mind needing a to autonate a linter to check for whitesoace bullshit.*

        **Python is my favorite language, actually. Really.