Hacker News new | ask | show | jobs
by tannhaeuser 9 days ago
Do people use python for new projects apart from ML stuff which hasn't moved to all-native yet?

My experience with Python is a really bad one for professional work: it's chaotic and slow, and has by far the worst versioning and packaging story of any mainstream language, yet its proponents keep praising it in denial.

I guess Python is an ok target for agentic coding, but my god do look Claude's commit messages pretentious, with code bases quickly heading into absolute unmaintainability. At least it had found gross JS injection vectors in a Django app that really shouldn't have made it through a code review, architecture level as they were, but oh well. A mature Django app is also not a nice dev experience IMO, with tons of implicit behavior all over the place encoded in a mix of magic filenames, database naming conventions, and URL routing quickly descending into regexp hacks.

8 comments

> My experience with Python is a really bad one for professional work: it's chaotic and slow, and has by far the worst versioning and packaging story of any mainstream language, yet its proponents keep praising it in denial.

Some people just don't have the experience you do, "its proponent keep praising it in denial", can we have a better level of debate, come on now.

It's the classic worse is better.

The slowest of all dynamic scripting languages. Breaking ABI's and API's left and right all the time. Not able to implement basic performance optims. Their infrastructure (pip) getting worse and worse, getting everyone to install private venv's for every app, leading to missing security updates, because updates just break everything.

People just love trouble.

> Their infrastructure (pip) getting worse and worse

Hi, I'm a pip maintainer, can you please report any issue you think is happening in recent versions of pip: https://github.com/pypa/pip/

I particularly work on performance and stability and think we've been making big strides over the last two years

> getting everyone to install private venv's for every app, leading to missing security updates, because updates just break everything.

venv's stop your OS tooling from breaking, Linux distro maintainers pushed Python packaging to not allow installing into the system packages by default, and they weren't wrong.

All these other problems are solved with proper use of a lock file (which are now standardized, and you can generate and install from them in the latest version of pip), and/or use a project tool (uv, poetry, etc.).

Yeah I still use Python. I've been using it for a long time, I can get stuff done quickly with it, but I feel the same way you do to a big extent. Not sure what to use instead. I hate anything having to do with Javascript even though some parts of the JS world beat Python hollow (it's the other parts that are even worse than Python). Golang? Rust? Both too low level. I do use C++ (also low level) when I need something to run fast, but it's not the first stop. Erlang/Elixir? I like Erlang (haven't used Elixir) but it's too small a world and I'd want something with a serious type system if I'm gonna change languages. Haskell? Too much headache to do even simple things, such as logging. Scala? The bureaucracy of Java with the headaches of Haskell. OCaml? Maybe underrated and I should look into it more, but again it seems like Haskell's poorer cousin. I'm sure I'm overlooking some good ones though.
I left the Python ecosystem some time ago.

Reasons: The Python 2->3 transition, asyncio package, async/await function coloring, abysmal package management, the GIL and poor performance, breakage from version to version. I'm ambivalent on type hints. I regret nothing, especially after seeing how the GC and JIT projects have been handled.

Golang addresses all of my problems with Python. Native code, good performance, an exceptional toolchain, a built-in package solution, great concurrency support, and they prioritize compatibility across versions. AI is good at writing Golang (as good as any other language I've tried), and AI benefits a lot from static types.

I'm split on Django--it's ok but I don't love it.

I don't think it's chaotic. I won't deny it's somewhat slow however usually anything performance sensitive gets shoved in a native code extension anyway.

As for packaging, I haven't had any problems with poetry or uv. The only time I ever had issues was with Windows in corporate environments where wheels were unavailable and it was also basically impossible to get the right toolchain installed for native code. However, not being able to install a compiler is not really a Python problem

Claude Code has a setting to change the git template so it doesn't attribute itself or you can also commit manually.

Half or more of the scientific research community live and breathe Python. Granted, it's Python 3.12, as 3.13 broke most of the C API, and everything COBOL and Fortran just about ground to a halt. But new projects are spun up constantly.
3.13 broke most of the C API

3.14 broke GC

I guess these kinds of priorities are exactly why Python is not my favorite programming language and why you have tens of Python versions installed on any machine. Not to talk about the Python 2 -> 3 drama that was also about fetishising syntax and pureness over pragmatism, installed base, and respect for existing code.

What happened in 3.13? Somehow I missed that. 2->3 was already a jump the shark incident though.
> I removed around 272 private functions and 15 private variables from the public C API (compared to Python 3.12 API).

[0] https://discuss.python.org/t/c-api-my-plan-to-clarify-privat...

Thanks, what madness. CPython wasn't abandoned in favor of PyPy at the 2 to 3 transition precisely because they wanted to keep the C extensions working. So what do they do next? Break the C extensions. Genius!
Python is the new Matlab and Mathematica combined.
Not anywhere near Mathematica, but a good replacement for Matlab. From a daily user of all those.
I forget who said it, but Python isn't the best at anything but it's decent to good at nearly everything, and that's why it's become so popular.

I do a lot of what I need symbolically in SymPy for dynamics analysis. Past that, I can't speak for it. At University I used Mathematica, but I just don't need all it can do at this point, so once again Python has proven to be "good enough." Matlab will be a similar story (e.g., I've never seen a good alternative to Simulink in Python).

But for everything else outside very specific domain tasks? Mathematica and Matlab are terrible for a lot of reasons. So I'll go out of my way to stay within the Python ecosystem, though I'm not afraid to pull out the specialty tools when I just can't make Python do the task near as well and/or nearly as quickly.

You are right in a way, but don't completely dismiss SymPy. Though I can see why you would never try it properly if you have a Mathematica license.
> apart from ML stuff

More and more applications need to use ML these days. So Python use will only grow.

I find the cult of python is hard to shift from some people. They just can't see it.