• BlueKey@fedia.io
    link
    fedilink
    arrow-up
    20
    ·
    16 hours ago

    I really don’t like comparing languages by Hello World complexity. You could use a lang which needs 3 chars to print it but sucks at everything else but it would still look better at first glance.

    As for this specific comparison: let the project grow to only midsize and you will crave for static types and well separated classes.

      • BlueKey@fedia.io
        link
        fedilink
        arrow-up
        2
        ·
        4 hours ago

        A good question, as I like it and don’t like it. It is without a doubt better than dynamic types.

        On the pro side it removes redundant writing the type again and again. On the con side it is almost impossible to see what type with what functions the variable in front of you has without an IDE (which you don’t have without cloning the repo) or without an already deep knowledge of the code.

        Same with extension functions (free functions which can be added to a type almost anywhere in the codebase). Very useful (Kotlin is a great example for this) but also confusing when you want to hunt down where this piece of code is coming from.

  • ExLisper@lemmy.curiana.net
    link
    fedilink
    arrow-up
    35
    arrow-down
    4
    ·
    21 hours ago

    I know it’s just a meme but Python is seriously the worst language I have ever worked with. Not because of language itself, this is fine for scripting, but because of the terrible tooling. pip is the most unreliable package manager I’ve seen, packages installed system wide collide with what you’re trying to install for you project, environment virtualization and version management is a mess with venv/pyenv and more doing same things differently (the standard can’t decide on just one tool for that) and on top of that you have all the ruff/black/mypy and many more offering same features but not really with a new tools coming out all the time. I not a Python expert but even people I worked with that are were confused but all this. I haven’t seen such a mess in any other language.

    • BartyDeCanter@lemmy.sdf.org
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      2 hours ago

      I have been using Python as my second language alongside whatever system language I was using professionally as well as for a variety of personal projects for about 20 years. I’m quite fond of the language for the sorts of things I use it for, which is either scripting glue or doing serious math because I hate dealing with Matlab licenses.

      And you are so fucking correct it isn’t even funny. Not only is the tooling a disaster, but it seems like every few years there is a new tooling scheme that doesn’t work quite right with the old one and is a disaster in its own unique way. And

      I know people get annoyed by rust evangelists, but I started using it six months ago and god damn does cargo slap. Want to initiate new project? One command gives you the complete boilerplate. Adding a new dep? One simple command. Want to pin or unpin a version? One simple command. Want to update all the deps to latest? One simple command. Want make a release package? One simple command. Want to update all your installed packages? One simple command. Want to keep every project tied to a different version? You guessed it.

      I definitely have some issues with Rust syntax, but I want cargo to manage my life.

      Really, the a Python project needs to take a look at the Zen of Python and apply it to the tooling. And then use cargo to do it.

      Edit: And, all of those simple commands work across all platforms the same. None of this, “Everything is perfectly cross platform and is the same anywhere. Unless you’re using a Mac. Or Windows. Or the wrong Linux distro.”

      Edit x2: There is, of course, an XKCD for that.

      Edit x3: And it’s not just venv. I am constantly struggling with which pip to use on which machine. Is it pip, pip3, pipx, uv pip, conda pip?

      • aliser@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        1 hour ago

        each time I start a Python project the first thing I have to deal with is making dependencies work. always some bullshit with python. might be an ide thing tho since I use IDEA.

    • evol@lemmy.today
      link
      fedilink
      English
      arrow-up
      1
      ·
      11 hours ago

      I wish AI came earlier, using python in the age of AI just sucks so much. Only reason to still use it is the libraries

      • BartyDeCanter@lemmy.sdf.org
        link
        fedilink
        arrow-up
        1
        ·
        41 minutes ago

        Yeah, the libraries are pretty great. I’m working on a kinda personal kinda professional project right now. Ideally it would support reading and writing about seven different sorta obscure file formats. For a bunch of reasons I’m writing it in rust and there is a good library for one of them, multiple half assed libraries for another, and none for any of the others. There is excellent support for all of them as a single Python library. My first step has become writing a comprehensive rust library for all of them.

    • Rooster326@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      8 hours ago

      They have changed this but only very recently with the Python Install Manager which forces programmers to develop the way they should have been with venv. Like Sept 2025 recently even though it’s been a valid language since 1991…

    • GreenKnight23@lemmy.world
      link
      fedilink
      arrow-up
      9
      arrow-down
      2
      ·
      20 hours ago

      anytime I have to maintain python I do it inside a container. Why? because anytime you deal with pieces of shit directly, you wear your PPE.

      everything you said, 10,000% agree. god forbid the Python purists hear it though, they’ll tell you that you’re just too stupid to understand the language enough to use it and will compare it with literally every language just to prove that they have the “biggest” python.

    • [object Object]@lemmy.world
      link
      fedilink
      arrow-up
      2
      arrow-down
      4
      ·
      edit-2
      14 hours ago

      Pyenv and venv are independent and don’t do any ‘same thing’, so you must be really talented to mess them up or be confused by them.

      I also don’t know what’s difficult about understanding why the system-wide installation exists or how to add local modules to the path (which venv does for you anyway).

    • Solemarc@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      24 hours ago

      I vaguely remember hearing this this was only really available for toy code and that this function created the class ignored the arguments and qualified println when you compiled it, so it wasn’t actually that useful?

              • Traister101@lemmy.today
                link
                fedilink
                arrow-up
                1
                ·
                12 hours ago

                Neither did Log4j in basically all cases, some maniac just put arbitrary code callbacks into their logger, undocumented and enabled by default. The insane part isn’t the feature itself it’s the fact it’s enabled by default in a logger of all things.

              • Traister101@lemmy.today
                link
                fedilink
                arrow-up
                2
                ·
                20 hours ago

                People in my experience are actually very serious about the standard out to debug log which is… baffling. Same people generally outright refuse to learn how to use a debugger in languages where those are pleasant

                • silasmariner@programming.dev
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  5 hours ago

                  Oh I’m completely serious. The joke is that everyone does it but everyone knows not to do it. I started doing it when I first ran into problems debugging actor contexts, and never stopped.

                  The good printlns become logs, obviously

  • ChaoticNeutralCzech@feddit.org
    link
    fedilink
    English
    arrow-up
    28
    ·
    1 day ago

    If you use Voyager on Firefox on Android, the last half-second is missing so you don’t get the joke.

    This appears:

    public class Main {
        public static void main(String[] args) {
            System.out.println("Hello World!");
        } 
    }
    

    and the hamster jumps very high

    • LiveLM@lemmy.zip
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 hours ago

      For me tapping the video so it would open fullscreen showed the missing last second

    • morph3ous@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      23 hours ago

      Thanks for posting that. I watched using mlem and the end was cut off as well, so I didn’t really get it.

      Makes sense now. :)