Top
Best
New

Posted by indigodaddy 1 day ago

If AI writes your code, why use Python?(medium.com)
888 points | 937 commentspage 12
suncemoje 19 hours ago|
I still like to understand the code, components, and structure if it’s something that will run in production
ryanolsonx 1 day ago||
Two things to consider: - When reading generated code, which programming language would be the most readable to you? - Which programming language guides AI to write correct code using language features or guardrails?

There you will find your answer.

voxelghost 1 day ago|
additionally (but related), what programming language is the easiest most efficent for you to reason about and feed back to AI in English (or your native language)
bad_username 1 day ago||
The article applies to a narrow case of a totally green field application that's going to be completely vibecoded. This is the only case where you reasonably can be indifferent to what the language is, and so you can abandon familiar Python and go with unfamiliar Rust. (If you _are_ familiar with Rust, the point of the article is moot.)

This "fair weather development" approach feels very risky if that application is going to be exposed to any serious usage. There WILL be a situation when things break and the AI will be powerless to fix it (quickly) without breaking something else in a vicious loop. There WILL be a situation where things work fine and tests pass with 3 concurrent users but grind to a complete halt with 1000 because there is something O(N^2) deep in the code. And you NEED a human to save your day (which requires also proper architecture for that to be possible in the first place). If you don't plan for this, and just hope for the best, then you are building nothing more than a toy. And if you plan for this, then it matters again what the language is, and whether your team is proficient in it.

Or maybe I too old fashioned or too behind the state of the AI art...

woeirua 1 day ago|
You’re behind the state of the art. I’m not exaggerating when I say AI can diagnose and solve those issues for you too.
b00ty4breakfast 1 day ago||
I haven't read the article (because I hate Medium) but I reckon the biggest reason why LLM-assisted projects use Python is because there is a metric buttload of python code on the web to be slurped up and used as training fodder.
teo_zero 1 day ago|
Now I'm curious: is a metric buttload much larger than an imperial one?
b00ty4breakfast 16 hours ago||
a metric buttload is exact 1.114 imperial heaps
QuadrupleA 1 day ago||
Because AI creates unmaintainable messes in any language, and ergonomic ones help humans clean up.
janfoeh 1 day ago|
Never mind cleaning up, you also have to understand the language just to judge and review the LLMs output. How else are you to separate good design and implementation from a bad one?
tomashm 1 day ago||
And with AI writing code, why use libraries, which makes us more vulnerable to 0-day attacks?

Our simulation core components are pure Fortran, no libraries, all written by Claude/Cursor/Codex.

lexicality 1 day ago||
I remember when having as little code to maintain as possible was an engineering goal. My professors were adamant that code reuse was a virtue. I had "less code = less bugs" drilled into me.

I'm sure the new way is better though, given how much my boss seems to be tracking my token usage these days...

puelocesar 1 day ago||
Honestly I cannot tell if this is satire or not
dsiegel2275 1 day ago||
10-100x faster? Maybe for strictly IO bound applications - but if you are building a web app you won't see that performance as network latency dominates.
kekpek 1 day ago||
I also try to use Ruby because it's much more readable than anything else. And yes, still need to review and understand what code AI generated there
xnx 1 day ago||
For the utilities I write it is faster to iterate without having to compile. When I get to the point where I'm done adding changing features, and performance is an annoyance I can always ask the AI to "rewrite this in Go". (I've never gotten to that point.)
throwaway2037 1 day ago|

    > it is faster to iterate without having to compile
I hear this sentiment from time to time. With a modern PC, IDE and Java or C# development toolkit, incremental compile times are insanely fast, even on very large projects. I can say with first hand experience: You can iterate as fast as Python. I don't know enough about Golang to say the same.
captaincrunch 18 hours ago|
You could answer this by asking yourself - Why not just let AI code in machine language?
yjftsjthsd-h 18 hours ago|
... Because I don't trust AI to work without structure. Which is also an excellent reason to avoid Python. Frankly, if AI is doing all the work, I'd rather skip past even rust and go to eg. https://kirancodes.me/posts/log-who-watches-the-watchers.htm... and have it work with formal verification.
More comments...