logoalt Hacker News

__mharrison__yesterday at 9:21 PM4 repliesview on HN

AI's are really good with Python. Quick turnaround. Easy to read. Tons of training data/examples. Many of the same reasons we wrote Python before.

Another benefit to using Python, is if you subscribe to writing/vibing a throwaway version first, a Python version is 100x better than a spec.

(Disclaimer: I teach Python and AI for a living and am doing a tutorial at pycon this week, Beyond vibe coding. Am also using other languages as there are times when Python isn't appropriate)


Replies

dakiolyesterday at 9:27 PM

Problem with Python and other non-strict typed languages is that if you let an LLM to write some stuff, you cannot truly be confident that nothing has broken. Even if your tests all pass. The LLM could have broken some path that only gets run in production in a very specific case. At least with strongly-typed languages you get a compiler error. In big codebases is non-negotiable

show 8 replies
onlyrealcuzzotoday at 2:10 AM

I've found the opposite.

If you want your code to actually work, LLMs are far worse at coding in Python than in something like Rust.

Sure, if you just want your code to pass the one test they wrote and work in the one case they coded for, Python is fine.

A lot of people think this is fine, until they actually do something with what they've built besides just... build it.

mountainrivertoday at 2:19 AM

Have you tried writing Rust? I often hear this from people who haven’t tried it. I’ve found absolutely no issues over python and everything works 100x better

hamdingerstoday at 12:32 AM

I figure a big part of it is that SWE-Bench is the target benchmark for programming and it's all python.

show 1 reply