• jedibob5@lemmy.world
    link
    fedilink
    English
    arrow-up
    64
    ·
    1 day ago

    The whitespace doesn’t bother me. Any IDE worth a damn will manage that for you. As for the type system, yeah, I strongly prefer static typing, but for simpler projects I can see the convenience of it.

    My real issue with Python comes with managing a development environment when multiple developers are working on it. Dependency management in Python is a headache, and while in theory, virtual envs should help with synchronizing environments from machine to machine, I still find it endlessly fiddly with a bunch of things that can go wrong that are hard to diagnose.

    Python is great for small scripts, proofs-of-concept, and such, but I wouldn’t write anything more heavy-duty than that in it.

    • morrowind@lemmy.ml
      link
      fedilink
      arrow-up
      10
      arrow-down
      1
      ·
      1 day ago

      Any IDE worth a damn will manage that for you.

      Yeah in like 10% of cases. I’m copying something from a pdf my prof gave. The only ones able fix spacing now are me and God

      • Incblob@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        11 hours ago

        You, god, pretty much any Formatter and ide. Black Formatter: “All leading tabs are converted to spaces, but tabs inside text are preserved.” Vscode has a command to convert between the two, and non-leading tabs are a simple replace/regex away from being converted. If you mean unorthodox spacing, if you have code with like 7 leading spaces, then that’s a matter for a priest.

    • Eager Eagle@lemmy.world
      link
      fedilink
      English
      arrow-up
      17
      arrow-down
      2
      ·
      1 day ago

      You can totally write heavy duty things if you know what you’re doing: use type hints, static checkers, tests, etc. It just takes a bit more effort and care.

      • ByteJunk@lemmy.world
        link
        fedilink
        arrow-up
        11
        arrow-down
        1
        ·
        1 day ago

        But why would I use something that takes more effort and care?

        I’m sure you’re right and it’s possible, but if I don’t have to fix another python project at work I’ll be in heaven.

        • grue@lemmy.world
          link
          fedilink
          English
          arrow-up
          15
          arrow-down
          1
          ·
          1 day ago

          Because “more effort and care” in Python is still way less of a pain in the ass than the minimum enforced boilerplate necessary in most other languages.

            • grue@lemmy.world
              link
              fedilink
              English
              arrow-up
              1
              ·
              19 hours ago

              Implement a basic socket connection in C (20 lines of manipulating struct sockaddrs and such), then do the same in Python (2 lines).

              And then go back and make the C version support IPV6, because your initial implementation didn’t.

              • “Look, Python is way easier to use than other languages! Look how complex this easy task is in Python versus other languages like assembly and brainfuck!”

                I’m not saying “do stuff in C it’s easier than Python”, but if I took e.g. C# then it’s also just two lines. That supports everything and is also faster than the Python implementation.

        • Eager Eagle@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          19 hours ago

          it’s more effort and care compared to a throwaway script, not necessarily compared to other languages

      • Ephera@lemmy.ml
        link
        fedilink
        English
        arrow-up
        5
        arrow-down
        1
        ·
        1 day ago

        Personally, my estimate doubles when we’re asked to implement something in Python…

        • Eager Eagle@lemmy.world
          link
          fedilink
          English
          arrow-up
          9
          ·
          1 day ago

          That’s a proficiency matter. Python is the language I can get something done the fastest today, but 6 years ago that would be Java or even JS for me.

          • fuck_u_spez_in_particular@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            9 hours ago

            Nah it’s also a language matter. People complain about Rusts complexity, meanwhile I complain about everything else in other languages, and am faster than in any other language, not necessarily because writing code is faster, but because I am able to just focus on writing code. I cannot tell that about other languages, because e.g. the packaging system is bad, or configuring an environment, or debugging stuff which a strong type-system would have caught already. Also IDE experience I think is the one thing that keeps me away from dynamic languages. Rust analyzer is so much better than anything else I’ve tried, and it keeps getting better (e.g. recently it was added to show whether a trait is object safe or not, and why it is not).

            Another thing that is often missed when comparing static with dynamic languages is just performance, python heavily relies on stuff written in a system language, as soon as a hot-loop is written in python, things get bad

          • Ephera@lemmy.ml
            link
            fedilink
            English
            arrow-up
            2
            ·
            19 hours ago

            Eh, it’s most definitely part of it, but the biggest time sink that I expect when working with Python is fixing the build system every two weeks on different devs’ PCs. I do imagine, if you eventually find a solution that works on most PCs that this workload will go down, but we had a substantial Python part in my previous project and over the course of the 1½ years that we worked on it, it really felt like we were making negative progress. Near the end of it, I couldn’t use PyCharm anymore, because I couldn’t figure out for the life of me, how to make it recognize the dependencies again.

    • masterspace@lemmy.ca
      link
      fedilink
      English
      arrow-up
      7
      ·
      edit-2
      1 day ago

      Yeah, working on python projects professionally is always a nightmare of configuring env variables and trying to get your system to perfectly match the reference dev system. I find Node.js projects to often be the simplest and most pain free to setup, but even compiled languages like C# and Java are often easier to get up and going than python.