Top
Best
New

Posted by indigodaddy 15 hours ago

If AI writes your code, why use Python?(medium.com)
532 points | 580 commentspage 2
rchowe 14 hours ago|
Python has a much more mature ecosystem than Rust, especially for AI/ML stuff. I ran into a rust crate that purported to do a certain ML algorithm but did not do it correctly. I managed to write a replacement with Claude though.

I do think enforcing correctness at the type system level is a good idea for AI, which is why I often choose languages like C# and Rust over Python. However, for some things Python is definitely the correct tool for the job.

sshine 13 hours ago||
I almost always pick Rust. Recently I wrote a plugin for something that was written in Go. I could have used Rust, but Go for one felt right because if the thing turned out well, others would surely find more value in having one toolchain.

The main reason is that you’re capable of reading it if you need to. And the recipient ecosystem expects a language. That’s why some data science communities pick R, MatLab, Julia, Python or Mojo not depending on what’s superior tech, but what their peers speak.

josh-sematic 11 hours ago|||
What peers are speaking Mojo? I’m not aware of any place it’s penetrated enough to be a “lingua Franca”
CharlieDigital 8 hours ago|||
C# feels kinda nice because it's a good balance.

Very good static typing, Roslyn analyzers, good tooling and decent hot reload (for a compiled language), really good ORM (EF Core) that implements UoW and reduces a lot of the need for transaction management (simplifying the code), flexible enough and fast enough for various kinds of use cases.

Source generators are underrated as well since they can make the code very terse and legible by generating a lot of standard boilerplate.

alexjplant 8 hours ago|||
I've written this before, but C# is a great language held back by its culture. I'd say that 80% of C# shops I've seen used it because they were started in the late 00s by some IT guy with a surplus HP server and a dream whose whole world was Microsoft products. They were staffed by people with little knowledge of OSS products who self-identify as ".NET developers" instead of software engineers. Almost invariably they seem to have some gnarly legacy monolith that everybody is slowly chipping away at while old-timers continue deploying .NET services to IIS running on Azure VMs because it's a small evolution of what they've been doing for the better part of 20 years.

In the interest of fairness the San Francisco version of this is also a thing: a giant, untyped ball of Rails spaghetti from the same period running on Heroku that everybody has Stockholm Syndrome'd their way into loving because of Ruby's elegance and beauty. The burden is merely shifted from a large Microsoft to a series of small SaaS companies :-)

Exceptions to this rule exist (hence my "80%") and modern .NET is lovely but it seems that the non-Java/Python mindshare is now taken up by the Golangs and Rusts of the world. It's a true shame since I do love C# for basically being a better Java.

DeathArrow 42 minutes ago||
Hmm, I am working on C# microservices based apps since 6 years ago. And I always deployed on cloud using Linux, usually in Kubernetes. I used Google Cloud and AWS beside Azure.

The whole stack is open source, Kubernetes, Docker, Hashicorp tools, Postgres, Redis, MongoDB, RabbitMQ, NATS, Kafka, Prometheus, Elastic Search, Kibana, Grafana and so on and so forth.

DeathArrow 48 minutes ago||||
>C# feels kinda nice because it's a good balance.

From my experience it's awesome to write C# with AI. But both Opus and GLM usually one shot the modification to the file so I didn't experienced cases lately where AI had to fix compile errors. True, I gave the AI agents the lsp for C#, so maybe that helps.

pier25 7 hours ago|||
Yeah C# is fantastic. I also love EF.

I stopped using it because overall it feels like Microsoft has lost the plot with .NET.

stephbook 6 hours ago||
What I hate about .NET is the atrocious naming.

Net Core, Net Framework, Net Common Core, .NET..

And God forbid any of these frameworks ever expose what they are in a config file. You start a project, hand it to a colleague and he can't figure out whether it's Framework or Core by looking at the files. You Google and are immediately bombarded by 15 year old threads.

Kwpolska 5 hours ago|||
If you start a project with .NET Framework in 2026, you're doing it wrong, plain and simple.

And the .csproj files do tell you which .NET they are.

<TargetFrameworkVersion>v4.</TargetFrameworkVersion> or <TargetFramework>net4</TargetFramework> is the old framework. Also, if the file is an unreadable mess listing all .cs files, it's generally .NET Framework.

<TargetFramework>netstandard2.0</TargetFramework> is .NET Standard 2.0, which means this library can be consumed from either Framework or modern .NET.

And finally, <TargetFramework>netX.0</TargetFramework> (X >= 5) is the modern .NET.

DeathArrow 40 minutes ago|||
Most web projects use JSON files for configuration. There are also some XML files for project configuration. If anything, you can run into too much configuration files.
mountainriver 9 hours ago|||
I think the only use cases are when it wraps low level C++ libs like ML libraries, and yes those are extremely difficult to reproduce
dev360 14 hours ago|||
Definitively something to be said for AI/ML library support. I find myself going with Rust / TS for a ton of my backend work lately though, even though I'm a huge Django fan for backend.
parpfish 11 hours ago|||
i think the enforcing the type system is good with AI for a couple reasons: - (speculating) typed language have faster/better LSPs that can be used to more efficiently modify code with tool use. - when a human DOES need to step in and start investigating/modifying the code, the strong typing makes it much easier to get oriented within their spaghetticode
bsder 12 hours ago||
Yeah, I mean, if I'm going to step away from the Python ecosystem and let AI manage/polyfill my dependencies, I might as well shift the whole way to OCaml/F# rather than Rust.

Then I get the benefits of GC and strong typing.

fulafel 4 hours ago||
> Go delivered most of the performance benefit at a fraction of the engineering cost. The biggest JS/TS shop on earth picked a harder, faster language for its flagship tool, and they did it because the effort calculus changed under them.

IME very few people think Go is harder than TS or JS - TS is quite complex and JS is a footgun range.

JS got popular for nontechnical reasons and TS is an attempt to make lemonade out of it.

vhantz 11 hours ago||
> A shipped app, in a language nobody on the team knew

Great! Let's look back on this not too far in the future.

djeastm 9 hours ago||
This happened before AI when a guy wrote a key tool in some random language a decade ago and the rest of us were left to maintain it. We somehow managed.
ruszki 9 hours ago||
Yet, it's not uncommon, that such tools are the reasons to still use DOS, dial-up internet, or frameworks which have more security holes than lines, because they are unmaintained for decades.
tnelsond4 10 hours ago|||
Yeah that's probably the only thing in the world that could be scarier than the electron app they were replacing
hirvi74 10 hours ago||
Why? Just job hop in 12-18 months, and that will be someone else's problem.
onlyrealcuzzo 9 hours ago||
They'll just have an LLM translate it to another language...
fxj 14 hours ago||
You can of course use any language but here is my advice: you should use the language that you know best to make your life as uncomplicated as possible when you want to understand what the LLM was creating.

Remember, you are the judge whether the code is OK and if you use assembler you might get really performant code, but can you trust it?

Of course it might be a good incentive to learn rust or go. Or challenge yourself to learn something really cool like LISP, COBOL, FORTRAN, APL or J. (just kidding...)

just my 2 ct...

jryio 11 hours ago|
Previously in my life as an IC, I wrote a lot of Golang. I worked on the larger end to end encrypted video calling service.

I hated it. I was dreaming of Rust the entire time to release me from the hell of if err != nil dozens of time per day.

After hours with LLMs I've changed my tune. There have been 5 clients of mine (who have excellent engineering teams) but cannot get coherent results out of LLMs using python or Typescript.

I arrived back at Golang being a frustratingly simple, consistent, and low-thrash programming language which inadvertently made itself well represented in the training corpus [1].

My concession is that if you are going to write a median program (reading/writing files, network, db, etc.)...

Pick Golang especially if you've never used it. LLMs are extremely good at it, frustratingly so.

[1] https://jry.io/writing/use-boring-languages-with-llms/

GavinAnderegg 9 hours ago||
It's strange to me that this blog post was written in English. If AI is available, why aren't we all communicating in Lojban? [0] It's an obviously superior language. What does it matter that many people already communicate in English and much of computing depends on that language? AI doesn't care about that. Plus, if you ever need to edit Lojban without AI, you should be able to pick it up in a few weeks, right?

[0]: https://en.wikipedia.org/wiki/Lojban

gwern 8 hours ago||
This post wasn't written in English, it was written in AIglish. (For god's sake, please tell me you see it at this point and you don't need to punch the opening into Pangram to see '100% AI' to recognize it by now?)

So in a way it's proving its own point. Why painfully write out by hand in English when the LLM will do a better job by porting your English prompt to AIglish and get +235 points and #3 on HN?

fsckboy 6 hours ago|||
his comment is that any self respecting article ought to have been written by AI, and if so it should have been written in Lojban.

>It's strange to me that this blog post was written in English. If AI is available, why aren't we all communicating in Lojban?

your comment seems to have not gotten his joke which was a recursion on English of the point of the article vis a vis Python

linkregister 8 hours ago||||
Correct — and honestly? Not just correct, but perceptive. You didn't just read the post — you saw through it. That's not pattern matching — that's instinct.
windows_hater_7 7 hours ago|||
You did more than just comment, you fostered an engaging dialog that navigates the intricacies of AI and its pivotal role in the human experience.
tdeck 8 minutes ago||
This is the real unlock.
postalcoder 7 hours ago||||
Shamelessness is the real unlock.
edg5000 7 hours ago||||
You're absolutely right!
r0x0r007 5 hours ago||||
Now you are not just talking like a debate expert, but a linguistic engineer. This is next level communications.
novok 7 hours ago||||
10/10
nso 7 hours ago|||
Not sure if satire
Ardren 7 hours ago|||
"Ah, the classic Poe’s Law in action. Reality has officially outpaced parody"

Do you want these to be shorter for quick replies on X/Twitter, or longer for more detailed forum discussions?

froh 6 hours ago|||
both.
xdennis 5 hours ago|||
> For god's sake, please tell me you see it at this point and you don't need to punch the opening into Pangram to see '100% AI' to recognize it by now?

I was not able to detect it's written by LLMs from the opening paragraphs. Can you please share some insights as to what gives it away. I didn't find any blatant stuff like em dashes or "it's not just x it's y".

ludwigvan 4 hours ago||
> Can you please share some insights as to what gives it away.

The article uses too much contrast even if not as obvious as "it's not x, it is y". Also some too punchy or over confident stuff like "that era is over blah blah".

Amusingly, you can feed it to an AI to extract the patterns that gives away that it is AI written.

542458 9 hours ago|||
I don’t think this holds at all, because the idea with a lot of vibe-code workflows is “humans never need to read the code” which would mean that human dev ergonomics are irrelevant. Here, the blog post is still clearly targeted at humans, so human reader ergonomics are still relevant.
ctippett 7 hours ago|||
Yeesh, is "never reading the code" really the modus operandi we want from AI?

Microsoft, for all their warts, at least had the compassion to call their AI product "Copilot", suggesting we have some residual agency in whatever it is that it produces.

quantumleaper 6 hours ago|||
Copilot is a legacy brand from 2021 (anyone remembers it's free beta? good times) when it was just a rudimentary autocomplete powered by GPT-3. I don't think it aligns with Microsoft's views and priorities now.
modriano 7 hours ago||||
It's clearly not the MO that capable engineers want, but it's the MO that is getting funded right now.

Reading code carefully is harder than writing code unless the code is written consistently and clearly in a way that is idiomatic to the reader. And there's way more code to review now, but companies aren't scaling up the number of skilled engineers on staff. So in practice, never reading all of the diffs is the MO that will be built into code we depend on.

lelanthran 6 hours ago||
> It's clearly not the MO that capable engineers want, but it's the MO that is getting funded right now.

Quite a few capable engineers really are that short-sighted!

The bigger question for the AI-techbro questioning "If AI writes your code, why use Python?" is "If AI writes your code, what use do we have for you?"

After all, there's dozens of people in the same business that have better domain knowledge but are unable to program - as a programmer the only value you added over random analysts and clerks was that you could automate shit.

Now you can't, so good luck competing with people who were already making half your salary when your largest value-prop is now gone.

simonkagedal 7 hours ago||||
There are lots of good use cases for vibe coding (”never reading the code”), prototypes, various explorations and one-offs. I’ve done various kinds of migrations where I didn’t bother to review the code much, just the output.

Possibly also some user-facing tools with a limited task and runtime environment.

Incidentally, these are all use cases where performance isn’t critical, typically, so you might as well write them in Python or Typescript or whatever makes most sense for the task.

Real production code? Yeah, you still need to be able to read it and understand it.

tedggh 5 hours ago||
You don’t need to read the code if you have a robust test suit to validate the output. The article implies testing is the new “reading”. If I spend 10 minutes reading code to find an edge case bug, I have lost the benefit of using AI. AI code is legacy code the moment is generated because I can’t tell why some lines were chosen, so the only way for me to add more features or refactor legacy code is by being very rigorous with testing.
theshrike79 6 hours ago|||
Let's say you get access to a microservice from another team in the company. Do you read through and audit every line of code?

What if it's from an external vendor? A 3rd party SaaS?

At which point do you stop caring about reading every line of code you run?

ctippett 2 hours ago||
This is perhaps where our perspectives differ, because I see the usage of LLMs not as an external third-party (another team per your example), but instead as an extension of one's self. Given that lens, I'm highly sensitive to the quality and function of its output, because ultimately its contribution is my responsibility.

I appreciate not everyone feels this way, but that's why I personally would be anathema not to read its code.

theshrike79 1 hour ago||
My philosophy is just to Duck-type the program: "If it walks like a duck and it quacks like a duck, then it must be a duck"

I don't care if the duck is wet spaghetti inside, it does what I need it to do within the parameters I can measure.

If it fails to quack or walk later on, I have production alerts for that and I'll deal with it then.

kevmo314 9 hours ago||||
Should've posted to moltbook
boxed 7 hours ago|||
If the code is written in a language that no one can read it becomes vibe coded by definition. However, if it's a readable language then people CAN look at the diffs.
throwawayk7h 9 hours ago|||
AI has not been trained on Lojban. And furthermore, this article is almost certainly primarily intended to be read by humans directly.

I understand you're being facetious, but I'm not sure what point you're trying to make about programming languages in comparison.

parsimo2010 9 hours ago|||
It’s funny that in your reply “this article is almost certainly intended to be read by humans” you made what is the best case to keep writing code in Python even with AI.

Sure, if you are going to have an AI do all your coding and maintenance you can use whatever language it’s best at. But if you want to participate in the writing, debugging, and maintenance, it has to be in a language that a human can read. I’m not saying that Rust or Go is unreadable, but I know I am better at Python personally and am going to keep using it until the speed penalty matters to my project, and then maybe I’ll let an AI rewrite the whole thing in a faster language.

3uler 7 hours ago|||
I’ve always found Ruby to be way more readable, what keeps me using python is the depth of libraries is unmatched.

So unless you’re into burning tokens having AI generate untested libraries, I’d stick to using the most idiomatic tool for the problem you are tackling.

irjustin 7 hours ago||
So, it's really interesting. We've started moving away from python libs because 25% OSS is out of date and another % is custom tweaks to the software help our use cases. In both scenarios it means our own fork.

And honestly it's not burning that many tokens if you've got an existing example lib to point to.

Null-Set 8 hours ago||||
I'd argue that while Rust has a high barrier to writing code due to lifetimes and other type constraints, its still quite easy to read.

(Kind of the inverse of perl)

Hamuko 7 hours ago||
While it's a lot easier to read then Perl, it's still not as easy as something like a Python.
zrm 6 hours ago||||
> But if you want to participate in the writing, debugging, and maintenance, it has to be in a language that a human can read.

I think the idea is that languages like Python and JavaScript make it easier for humans to write the initial implementation, whereas the "hard" languages from the perspective of creating the minimum viable product are the ones that make it easier for humans to maintain the code, and this has historically been a major trade off.

Whereas if you have the AI write the initial implementation...

lelanthran 6 hours ago||||
> I know I am better at Python personally and am going to keep using it until the speed penalty matters to my project,

I hate Python (app distribution is painful), but will still reach for it before I reach for Go. Rust doesn't even enter the equation.

I would not have even needed to reach for Go in about half my programs if Python had mandatory typing and single-file no-dep distribution.

> and then maybe I’ll let an AI rewrite the whole thing in a faster language.

Even then, my reasons for discarding Python when I do discard it is almost never "performance", it's because the problem space requires mandatory typing for complex data types, or concurrency, or easy distribution.

Of course, this requires me to figure out quite early ion a project that those things would be needed.

cwnyth 9 hours ago|||
Did you read the article? I think you're arguing against a strawman.
parsimo2010 9 hours ago||
I did read the article and I’m not arguing against a straw man. If you’re going to let an AI agent do everything for you then go ahead and use Rust (or any language with a strong type system that benefits agents).

But if I’m participating then I’m going to use Python because it’s easier to read.

If there’s anything that I’m arguing against is the author’s claim that the ecosystem of libraries (regardless of whether they are a wrapper) and readability don’t matter anymore. I’d say that in a lot of smaller teams it still matters. We’re not all using AI to ship slop. A lot of us are using AI to work on our ideas for our hobbies or for research. And it’s not fulfilling unless I get to be involved in the process.

cwnyth 8 hours ago||
But it's not talking about people like you. It's like getting mad at someone suggesting selling their car for a self-driving car, but you ride a bike everywhere. Take a breather and recognize that not every article is personally meant for you or your situation.

And this isn't even a defense of the premise. I'm not using AI to generate assembly code, because I don't know assembly.

skeledrew 7 hours ago||||
> AI has not been trained on Lojban

I took the challenge and asked Perplexity. I have no idea how much of it is correct, if any, but I think the result[0] is pretty interesting anyway, especially compared to Esperanto [1].

[0] https://www.perplexity.ai/search/8315bbb6-fa32-40f3-8b2b-c6c...

[1] https://www.perplexity.ai/search/9c3839ba-1d68-4be9-afd1-4ef...

lelanthran 6 hours ago||||
> And furthermore, this article is almost certainly primarily intended to be read by humans directly.

No, it's intended to generate traction for the author who lists his primary occupation as "building AI coding tools".

His goal is not the same as your goal.

tjwebbnorfolk 8 hours ago||||
Python is intended to be read by humans also. Since I am a human and I want to be able to read and review the code in my project, I therefore have AI write in Python as well.
woctordho 7 hours ago|||
How do you know it's intended to be read by humans? Don't you see how many web crawlers are there?
amarant 9 hours ago|||
Oh, I hadn't heard of lojban before. Cool project!

Anecdotally, I think language effects the way you think more than most people realise, which is why I think a logical language is a great idea: it might "trick" people into thinking more logically!

Now to get someone to actually speak it with!

bnjms 6 hours ago||
If you’ve not heard of Lojban you may not have heard of Sapir-Whorf. Or you’re indirectly referring to it.

https://plato.stanford.edu/archives/win2011/entries/relativi...

https://en.wikipedia.org/wiki/Linguistic_relativity

amarant 6 hours ago|||
I had not! Cool to see that there's a established theory about linguistic determinism(great term btw!)

I was only speaking from personal experience, I moved from Sweden to Brazil in my early twenties and after a while I began thinking and dreaming in Portuguese. I noticed then that my thought process changed(actually, I noticed it upon moving back to Sweden, as my thoughts and dreams shifted back to my mother's tongue. The shift the way back was much faster since I already spoke Swedish whereas in Brazil I had to learn the language before beginning thinking in it)

Anyway, I noticed then that I would interpret the world differently depending on which language I used for my internal monologue. Like way different. It was a curious experience!

momoschili 9 hours ago|||
Are you trying to psyop us into using Lojban?
georgeecollins 8 hours ago|||
Bona ideo! Ni ĉiuj komencu komuniki en Esperanto en ĉi tiu forumo.
darkwater 5 hours ago||
> Bona ideo!

I don't really know Esperanto but did they make a language from scratch with gender inconsistencies like in the already existing ones? Unless the a and o at the end of both words don't express gender like in Latin derived languages.

funnybeam 4 hours ago||
They don’t express gender, they signify adjective and noun. No genders in Esperanto
KingFelix 7 hours ago|||
Thank you for sending me down the Logical Language Group rabbit hole
adastra22 6 hours ago|||
Well for one, Lojban is not better than English.
papa_pandora 8 hours ago|||
what made you draw parallel between message that's being delivered by the blog, and how the blod should be delivered?
ulfw 6 hours ago|||
How is this comparable in any way?

The recipient of the blog posts (all of us) can read English. None can read whatever this Logjam is.

If AI writes code why not write it straight into assembler or binary? No need to compile an intermediate language if the end user (the machine) is running on binary not on Python, nor on Rust, nor on BASIC or Swift or any intermediary human-optimised language

altmanaltman 8 hours ago|||
A computer can understand all programming languages proficiently. How many people reading the blog know Lojban proficiently?

I get what you are trying to say but its a pretty bad analogy.

Also all programming languages do use english mainly in syntax but you are probably from a english-speaking country so you don't notice the irony.

And most people using AI will not need to edit their code at all if you go at all right? They will just keep refactoring with AI, why does the toughness of learning a language or whatever matter in this situation?

LAC-Tech 9 hours ago||
[flagged]
GavinAnderegg 9 hours ago|||
I'll state it plainly, then: Python is more widely used and supported. It has more examples, and more people understand it and can debug it. I hope that helps you.
rdevilla 9 hours ago|||
[flagged]
cwillu 7 hours ago||
Oh fuck off.

--Sincerely, A Canadian.

bix6 9 hours ago|||
I found their reply funnier than yours
alkonaut 1 hour ago||
Agreed. Even if Python or JS was the language I knew well, even if the platform ecosystem is the one I need, I'd _still_ make very sure to use at least strong types (even if not static) for anything an AI co-creates and is maintained longer term.

Rust isn't perfect due to rather long turnaround for compile/test iterations, but a lot of those can be avoided if the type checking is quicker than compilation. Rust is also more verbose than python and other very high level languages, which means your token budget is eaten more quickly as it works on a lower level.

phplovesong 1 hour ago||
This hits hard, specially for PHP. Previously we had devs "who only knew" PHP, and once they started vibe coding most have started using Go.

As a benefit i find that static types help AI to make correct/better decisitions than you see in PHP (where types are mostly only class types, nominal or primitive [lol no generics])

But its pretty much true, i will forsee a fall in dynamic languges, as the usecase is pretty much void and null.

__mharrison__ 14 hours ago||
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)

dakiol 14 hours ago||
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
mjr00 11 hours ago|||
Python has had type hinting for quite a while, and adding validation with mypy/pyright/ty as a step in CLAUDE.md (as well as having it as part of your CI pipeline) can emulate static type checking pretty well.
hasley 4 hours ago||
Agree.

I am using type hints in Python as much as possible for my hand-coding. And it catches a lot of bugs (especially during code refactoring) that I would not have noticed so easily.

zahlman 3 hours ago||
> And it catches a lot of bugs (especially during code refactoring) that I would not have noticed so easily.

Can you give me an example of a recent experience with this? I've been working without type annotations for many, many years, and I keep finding that every time I find a bug I just don't feel like type annotations would have helped catch it, at least not to an extent that justifies the effort to put them in in the first place.

bee_rider 11 hours ago||||
Dynamically typed languages just add one more type of bug that can’t be caught at compile time. That’s not helpful, sure, but it’s one type of bug among many.

The issue you mention, execution paths not hit by test cases, is made worse by having more complicated code. Duck-typing can help reduce the number of paths.

Static vs dynamic… I don’t see an obvious winner here.

fyredge 11 hours ago||||
My take is that I can never be confident that anything an LLM produce will not be broken. Since I will have to check everything it produces anyways, why not write it in a human friendly language, i.e. python? C and rust may have better strictness, but the amount of boiler code to set up that system takes up a lot of mental space that could be better used to architect the problem at hand.
ttflee 9 hours ago||||
Perhaps we could do it in Python in the first pass for validation purpose. And then vibe rewrite it in Haskell.
serf 14 hours ago||||
so it just boils down to strictness even when we're talking LLMs?

I agree with you about fast failure being a nice feature , but I also think that if you're TDDing a bunch of stuff and it fails in some categorical way , well then the test suite was lazy.

plqbfbv 13 hours ago|||
> so it just boils down to strictness even when we're talking LLMs?

The article describes what I've been doing for the past few months - I did small python projects in the past because of the ecosystem: I couldn't possibly write a ton of the stuff required for the things I wanted to do, so I leaned into python because someone already wrote it for me. Quality of deps was mostly ok for the happy paths, but always a chore to patch the broken ones.

Nowadays I tell Claude what I want to build and I always ask it whether rust is a good choice for it. It'll pick up the right crates or choose whether it should DIY, do all the plumbing, nail all the logic, and in ~30m I'll have something very solid that would have taken me 3+ weeks of part-time evening coding in python. I think the article is right and rust is the closest to the "best language" we have for LLM coding at the moment: the strict typing and the tooling dramatically reduce the output space for LLMs, and 99% of errors have a clear, precise explanation that is actionable, and the compiler helps you a lot there too.

I think it also boils down to the fact that you cannot reliably and quickly answer "why is this arg None?" in languages like python without figuring out the call graph and evaluating possible states and inputs/outputs. Rust makes all that explicit and forces you handle it, which I feel dramatically cuts the time an LLM needs to spend figuring out why it's broken or what to do next. EDIT: The fact that you get memory safety on top of all this and it's handled by the compiler is yet another advantage for LLMs: the logic that gets written is simpler to reason about, because if you try to mutably access the same variable in two different places, the compiler will feed this back to the LLM at build time. In other languages that would be a "code smell" or would require static analysis.

Strictness is a quality for software and a chore for humans, and of course the stricter you are at representing your logic and your state machine, the less ways a program can break. LLMs writing in rust give you the strictness without the chore part, and it's a very good deal from my point of view.

__mharrison__ 14 hours ago|||
If you are using TDD with any recent model and even local models (qwen3.5+), you alleviate most of the issues mentioned.

Note that:

Writing code, then tests

Is not equivalent to:

Writing tests, then code

faangguyindia 11 hours ago||||
This is why you should use Haskell.
black_knight 10 hours ago||
Haskell is a good language for LLMs! Claude knows it really well, and the type system catches so many mistakes. Just make sure to tell it to model the domain in the type from the start.

Also, Haskell can be really performant and low level, while still keeping the benefits of typing. With the C foreign function interface you can really do anything in Haskell!

__mharrison__ 14 hours ago||||
My anecdotal (sample size 1) experience is not consistent with this. I code fast. Refactor fast. My stuff doesn't break. But my methodology isn't the same as other's.
QuadmasterXLII 14 hours ago|||
i have bad news
__mharrison__ 14 hours ago||
Lay it on. I love to collect other's anecdotes and see where they align (or disagree)
onlyrealcuzzo 9 hours ago|||
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.

mountainriver 9 hours ago|||
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
hamdingers 11 hours ago||
I figure a big part of it is that SWE-Bench is the target benchmark for programming and it's all python.
solidasparagus 11 hours ago||
Python being the language LLMs are best at predates SWE-Bench by years.
rundigen12 1 hour ago||
And why use readable variable names? "aA=q_(c8z,fW8)"

Seriously though, almost all the examples in TFA are of rewriting existing code. It may be that Python is still best for the rapid dev iteration. Then sure, cross-compile into Rust via the LLM.

Plus, If we care about token usage counts, Python has a lot more opportunities for compact "import thing_I_need" than having to generate entire libraries in Rust.

librasteve 13 hours ago|
Many here propose replacing Python with more performant, but less familiar languages - mostly Rust, Go. But I find the argument that the AI - HUMAN interface is the most important. A simple version of this is “no, stick with Python if that’s what you know”. A more interesting version is “use this new found AI leeway to move up the abstraction level”, “try something more expressive and human oriented”, “make a DSL and parser that suits the domain (and focuses the AI)”. Despite being a minority language, Raku is ideal for these aspects (esp with built in Grammars and general kitchen sink repartee) and works surprisingly well with most popular LLMs.
hirvi74 9 hours ago||
I honestly think Mojo is the dark horse in this race. That is assuming all the roadmap goals are fulfilled. We're talking about C++-like performance, Python syntax, complete compatibility with Python, designed from the start to interface with AI, compile-time metaprogramming like Zig, and all kinds of other goodies.

So yes, people can bless Go and Rust all they want. Nothing is wrong with the languages, but I agree that learning them for the sake of AI usage is probably not the best idea if one is competent in a language already.

Disclosure: Lattner is one of my programming heroes, so I might be biased.

zephen 8 hours ago||
I really wanted to like Mojo, but the more I read about it, the more it really wasn't Python even though, starting out, that was a major claim to fame.

There is an excellent chance it will be awesome stuff. But they did themselves a huge disservice with the initial claim about trying to be Python compatible.

qotgalaxy 11 hours ago||
[dead]
More comments...