Live data from Hacker News

Learning Go as a Python Developer: The Good and the Bad

new.pythonforengineers.com

231–240 of 269 posts

Re: Learning Go as a Python Developer: The Good and the Bad

#232
post #64
post #18

Earlier quoted context omitted.

Sure can pin versions, it’s easy too, if you just use «pip freeze».

Now you lost track of which are your top level dependencies and which are dependencies of dependencies.

Then use pip compile.

Re: Learning Go as a Python Developer: The Good and the Bad

#233
post #49

i dragged my feet on go for a long time. i also thought that skipping go and moving to rust was the play. a few years later, i still write python often, but i don’t build systems with it. python i now use like bash, to glue things together and automate random things. it’s a fantastic language and i will never drop it. the verbosity of go is the biggest hurdle for a pythonista. the thought of giving up context manager…

Obviously the closest thing in the general sense to Python is Ruby. But I think a case can be made that in practice, the closest thing to Python on the static language side is Go. The list of superficial differences is a mile long, I don't deny, nor will I exhaust my audience's patience with actually writing them out. But the interface orientation of Go captures the essence of how you design in Python surprisingly we…

Really? Swift feels so much closer than this.

Re: Learning Go as a Python Developer: The Good and the Bad

#234
post #96

Earlier quoted context omitted.

Sometimes I feel people are using Python very differently than me. I just use pip freeze and virtualenv (these are Python basics, not some exotic tools) and I feel it works great. Granted, you don't get a nice executable, but it's still miles ahead of C++ (people literally put their code into header files so you don't have to link to a library), and even modern languages like rust (stuff is always broken, or I have s…

When I was a Python dev, I never saw that happen in ten years or so of work. Pip freeze and virtualenv just worked for me. I will say, though, that this only accounts for times where you’re not upgrading dependencies. Where I’ve always run into issues in Python was when I decided to upgrade a dependency and eventually trigger some impossible mess.

Piptools [1] resolves this by having a requirements.in file where you specify your top level dependencies, doing the lookup and merging of dependency versions and then generating a requirements.txt lock file. Honestly it’s the easiest and least complex of Python’s dependency tools that just gets out of your way instead of mandating a totally separate workflow a la Poetry.

[1] https://github.com/jazzband/pip-tools

Re: Learning Go as a Python Developer: The Good and the Bad

#235
post #218

Earlier quoted context omitted.

Or the "complainers" work with Rust and Elixir and giggle at Python's last-century dependency-management woes, while they run a command or two and can upgrade and/or pin their dependencies and put that in version control and have builds identical [to those on their dev machines] in their CI/CD environment. ¯\_(ツ)_/¯ Your comment hints that you are feeling personally attacked when Python is criticized. Friendly unsoli…

> Your comment hints that you are feeling personally attacked when Python is criticized. I am not feeling personally attacked (I am not married to Python), I am mostly just tired of reading the same unproductive type of complaints over and over again. This attitude is not unique to Python's situation, but actually is typical to our industry. It makes me want to find a different job, on some days. The community is try…

I can agree with your comment. What's missing is the possibility to, you know, just jump ship.

You might not be married to Python but it sure looks that way for many others. I switched main languages no less than 4 times in my career and each time it was an objective improvement.

The thing that kind of makes me look down on other programmers is them refusing to move on.

Re: Learning Go as a Python Developer: The Good and the Bad

#236

Earlier quoted context omitted.

This comment section itself clearly shows how crazy dependency and environment management is in Python. In this thread alone, we've received instructions to... - poetry - "Just pin the dependencies and use Docker" - pip freeze - Vendoring in dependency code - pipreqs - virtualenv This is simply a mess and it's handled much better in other languages. I manage a small agency team and there are some weeks where I feel l…

The real issue is that you can't have multiple versions installed at the same time. if you could import numpy==3.2 it'd solve many problems.

That's a feature, not a bug.

Re: Learning Go as a Python Developer: The Good and the Bad

#237

> I had heard of Go for many years, but never stuck with it; it gets constant negative press on Hacker News/Reddit I think on Hacker News it's really fashionable to criticize Go, and this has led to a culture where Go gets significantly more negativity than it deserves. As technologists, one of our most important jobs is to see through such fashions and judge languages/tools/technologies based on their actual merit.…

The very opposite. Go and Rust are constantly on HN and get tons of praise. They are both overhyped here.

Re: Learning Go as a Python Developer: The Good and the Bad

#238
post #64

Earlier quoted context omitted.

Now you lost track of which are your top level dependencies and which are dependencies of dependencies.

Then use pip compile.

Sure. Or poetry, or pipenv, or whatever third party packaging system you enjoy.

The whole point of GP is that python lacks a native sane packaging system, which I agree.

Re: Learning Go as a Python Developer: The Good and the Bad

#239
So the biggest complaints, from what I read here, is "it does not allow me to write bad code or make mistakes, I want something I can hack together without having to worry about conciseness", and based on groupthink "HN was negative about it". Languages like Rust and Go were designed to keep this sort of thinking away.

Re: Learning Go as a Python Developer: The Good and the Bad

#240
post #179

Earlier quoted context omitted.

Wat? What dependencies? I have right now 100 separate Python projects which each have their own venv, their own isolated dependencies, and their own isolated copy of Python itself and my code dir doesn’t even crack top 10 hard drive space.

Machine learning packages like Tensorflow can result in GB size package directories.

Yes, the biggest available library is big, that's hardly an argument though.
Post reply on HN