Live data from Hacker News

If AI writes your code, why use Python?

medium.com

421–430 of 1001 posts

Re: If AI writes your code, why use Python?

#424

Read the first few comments and surprised I didn’t see it, but training data. The voluminous amount of Python in the training data. I could write in brainfuck with ai, but I presume, wouldn’t get the same results than if going with python. My follow up question: with AI now, why care about a lang until you need to?

Surprisingly, LLMs are actually much worse at reasoning in Python than other common programming languages for agentic coding tasks. Data here: https://gertlabs.com/rankings?mode=agentic_coding

Mm, the code is constrained to run inside a game 'tick'?

Re: If AI writes your code, why use Python?

#426

"Rust, [...], a build system that fought you" I started using Rust in 2018 and I've never used a build system that fought me less, ever, before or after. I stopped reading after that sentence.

I presume they were talking about C++? But yeah weird to bring that up in a comparison with Python of all things. A language with the build system equivalent of "stop hitting yourself". (At least until uv saved us from that bullshit.)

Re: If AI writes your code, why use Python?

#428

Earlier quoted context omitted.

Thanks for the recs, we will look into adding some of these, maybe OCaml for variety. I'm not familiar with Racket. Mistral Medium 3.5 is on there, but you will have to scroll down pretty far to find it (does not perform well): https://gertlabs.com/rankings?mode=oneshot_coding

Thanks for that, I hadn't scrolled down far enough. Just want to be sure I'm reading the results correctly... When I compare GPT-5.5 with Mistral Medium 3.5, I see in the tables: a) Mistral beats GPT in Java and C++ b) It's close for Rust c) GPT-5.5 easily wins for Go, Javascript, Python and Typescript Model choice really does appear to be language dependent (assuming I'm reading the results correctly).

The deeper you go into the filters (single models, cross correlated by specific languages), the smaller your sample sizes. A known limitation, tbh I doubt Mistral is better than GPT 5.5 at programming in any specific language and probably hit a few lower quality generations by GPT 5.5 by chance (but I could be wrong! We're always adding more samples so data improves over time. We always prioritize largest sample counts for near-frontier models first).

Re: If AI writes your code, why use Python?

#429
post #420

Earlier quoted context omitted.

Surprisingly, LLMs are actually much worse at reasoning in Python than other common programming languages for agentic coding tasks. Data here: https://gertlabs.com/rankings?mode=agentic_coding

My feeling is that for agentic tasks this is not only language design but also LSPs, error messages and static analysis capabilities that dominate the benchmarks. It would IMHO be interesting to look into better subsets of python and style/rewrite techniques as well as alternative linter and their effects on performance.

[dead]

Re: If AI writes your code, why use Python?

#430
One underrated advantage of using Python or Typescript is that AI agents can inspect the code of installed dependencies.

This means you don't have to muck around with supplying the right documentation for each version of each dependency, or worry about hallucinated interfaces (at least with the latest models).

In the past you'd have to dig through a foreign codebase manually to figure out why a documented interface for a dependency is not working as expected, but frontier models automate that quite well.

Post reply on HN