Lately I just have Claude build most things in Rust, it's really amazing. I tried Go, but I found it wasn't as good--Rust really does to me feel like Python. That said, it still struggles with the same class of errors of building complex systems. I've tried using TLA+, Alloy, and other things but haven't found the trick yet. The best I've found is reimplementing all external systems in memory and e2e testing everything extensively, without reimplementing the tests become unusably slow, and Claude can rewrite huge surface areas with ease--it's somewhere between mocking and literally just reimplementing the external systems.
Because there is no negatives, only positives.
I can maintain the Python code myself and I can execute it everywhere.
If I let my LLM write in Rust then when things break I am out of luck. Also Rust needs to be compiled which means I can't just share the code as freely.
I assume this is why things like PyO3 are popping up? If so, sort of a fascinating way to compartmentalize new rust code into legacy .py code in lieu of a refactor, or at least, a way to do a staggered refactor and eat the elephant in bites :)
I'm sure there are plenty of caveats and breaking points, but if we do adhere to the claim that an LLM coding tool is a nondeterministic sort of compiler then it really does make sense to pick the most performant language available. Obviously there are caveats of libraries and native advantages of various languages. I've been doing stuff in C++ for the past month or so and the only slow down from the language choice is compilation time.
I think the author misunderstands what is good about Python.
One of the big strengths of Python is legibility: most developers find it easy to read and understand.
If you are planning to have humans verify the code you're using in production, to confirm it implements your intent, the readability of the code you are producing is important.
Performance is valuable, but for a lot of code, performance is less important than correctness and ease of verifying it.
If you are imagining your codebase being one where nobody but Claude reads the code, you might as well do Rust for the better performance. But I don't think a lot of organizations are doing that.
Well don't ask us. If AI writes your code, why not ask it? You could probably make it write a whole article for ya.
To put it simply, Python feels recoverable when something goes wrong, but Rust often feels like solving a compiler puzzle. Honestly, I still do not really know how to handle lifetimes properly.
When I use AI to help with coding, there is almost always a point where it gets stuck and I have to solve the problem myself. If I were using Rust at that point, it would be much more painful.
I know Rust has a very strong reputation in the community, but to be honest, I find it a difficult and frustrating language to work with. I would use it when I truly need systems-level performance, but for most high-level work I would rather use Python, because I can move much faster. In most projects, that level of raw performance is not actually necessary.
I use a mix of both to try and leverage their advantages.
Rust in most cases, especially for back end.
Python when it's low risk (say monitoring dashboard or similar API heavy) or plays to python strengths (e.g. ML/AI - everything ML seems to be python).
IMO, just use the language your know it well. It might be a little bit off topic, if you are going multiple platforms development now, such as backend, ios and android, will you go native now? or use cross platform languages? :D
Claude writes java pretty well, and faster than Rust. It's a great middle ground for some projects. I've switched back from Rust to Java for some things.
I don't know why you would use Python at all except for small iterative projects. If you hate java for some reason, there's Go...
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.
As others have said, the main benefit with Python over Rust is library support especially with ML features. The other gap as I see it with Rust is the lack of native flexible UI support. The nice thing about Rust though is it can serve as a very fast and stable core for an app and offload specifics to TS and Python as their strengths allow, so you get the best of all worlds.
My current goto for desktop apps is Tauri, which give us a rust backend and TS fronted (usually React). Local ML features can be easily loaded as a python sidecar. Production bundling can be a little challenging but it seems to work well so far.
Sidenote: Golang is also an amazing language for LLM use, I generally do most of my "infra" stuff in Golang over Rust, but either work fine most of the time.
> You used Python or TypeScript because[…]. because Rust, Go, C++, and many more would give you 10–100x the performance, but you paid for it: […] a build system that fought you.
I would argue I spent more time fighting the TypeScript build system than Rust’s.
But up until recently I only used either just often enough to never remember what magic configuration needed to go in my tsconfig.json and package.json to get TypeScript to work.
I had agents code up an app for me in Swift a while back and the entire experience was so much better than your typical Python experience. The agents took full advantage of the compiler and static typing. There were far fewer bugs than expected.
I find if I ask most LLMs to write a self contained script/utility, even in codebases that are 90-100% written in some other language most will default to using python for it, or sometimes bash.
Usually those kinds of utility scripts are one-shotted without any further input from me, and once they're there and doing what I need I usually don't bother converting them to whatever I would have written them in otherwise (bash would be my usual preference for really small scripts, typescript or rust for bigger utilities, I hate writing python but reading it is fine... kind of).
Well, I'd still want something I can read...
Asking Clodex to build me a hello world web backend in Rust, Go, Python: Python is read with great ease. Go is fine too, a bit verbose but still ok. Rust hurts my eyes.
I'd settle with Go for this use case.
If you're using GenAI, you should go through the process of selecting an optimal tech stack for each solution, but also take into consideration that Claude and other services probably the most knowledge of python, javascript, and typescript with go, rust, java, and c# following closely behind. Consider what you're building and what elements of the tech stack is optimal for your problem-space.
I don't know rust at all and I've built three applications using it with Claude because it has speed and correctness built-in.
I use Typescript for 90% of the things I build. For web development I've used a number of tools, but mostly react, nextjs, or raw html/css/js. But if I were building an enterprise application I'd consider my team and whether opinionated (Angular) was optimal over flexible (React).
Each project should consider its own optimal tech stack.
So you are not going to review code? So you are not going to modify code? How many cases that AI Can always modify code correctly without human input?
I have been wondering on a similar thing; am looking for feedback:
There are many existing, often mature, third-party software libraries or solutions that a new project could use but which hide the internals, including how the data is organized behind the scenes*. Vibe-coding for the specific project requirements, instead of using the pre-existing third-party libraries, is now becoming a feasible option. The latter may be simpler (no features beyond the actual need), more flexible (easier to add new needed features), and the data/model behind could be more accessible.
Looking for feedback on pros/cons and experiences along this.
* I care for the data as it is can be longer-lived than the code itself.
Thanks.
I still use TypeScript because I know it best. When AI makes a mistake, I can find the bug much faster. For me, the speed of writing code doesn't matter as much as the speed of fixing it.
Funny, along the same lines I asked an AI to write some wasm text. It was ridiculously bad and I had to intervene heavily to get something working as intended.
So you have a chance to be able to read the absurdly barroque code AI produces.
Because the SWE benchmarks for LLM coding are done on python code bases, hence you are likely gonna have superior results
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.
The ideal language for AI coding:
1. Type safety as basic guard rails that LLM output is syntactically and schematically correct
2. Concise since you have to review a lot more code
3. Easy to debug / good observability since you can't rely on your understanding of the code. Something functional where you can observe the state at any moment would be ideal.
4. A very large set of public code examples across various domains so there's enough training data for the LLM to be proficient in that language
5. A large open source ecosystem of libraries to write less code and avoid the tendency for generated code to bloat
It's basically all the same things you look for in general. I think TypeScript scores high here but I'm curious if anyone knows of a language that fits these criteria better.
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.
Why not use AI to speed up the Python runtime? V8 showed what focused engineering can do for JavaScript, and Astral showed how much room there is to improve Python tooling. The same tricks may not apply directly, but AI could definitely accelerate the work.
Assuming you are thinking about software architecture and looking under the hood, you are likely to be reading much more code than before. Python is really nice on the eyes and you can easily get a good grasp of what the code is doing. Plus, it's dynamically but strongly typed, so what you see in the code is usually what you get.
I think the rule of thumb is to use the tool that is right for the job and that you are going to be able to understand the output.
I think it is an interesting question what kind of programming language one needs for an era of agents. It is clear that the programming language that was designed for humans is not necessarily the best for AI-driven software development. I guess the qualities one would want is some formal correctness guarantees, high performance. A question is whether this language is Rust or it is possible to design a better new language.
I build all my projects with Rust and Typescript (https://github.com/brainless). I had started learning Rust around 2023 but was progressing very slow. Since I left writing (or even reading) code line by line about a year ago, I build exclusively with Rust and Typescript. API types are generated from Rust. All my projects have a shared-types folder with a utility to generated Typescript types. I have a template that I use for each of my projects: https://github.com/brainless/rustysolid.
I am from a Python background (11 years or so), PHP before that and C/C++ in college days. Rust works very well with coding agents. The amount of code in training data may be less but I would rather have the agent fight the compiler. Given that OpenAI and Anthropic seem interested in Rust, chances are that there is a ton of synthetic code generated with Rust.
Because I don't only write the code. I will also read it, many more times.
This seems to assume that all there is, is systems software, tools and frameworks. Why ignore the elephant in the room - business / enterprise / line-of-business software? The case for Rust, Go, Gleam and Zig vastly changes for these versus Java or C#.
Is there a blocker that would prevent future AI to write perfect assembler (for n architectures) in 1st pass?
> why use Python
when I said “the ecosystem” I didn’t mean of libraries and other developers, I meant of recruiters and hiring managers
and whose humiliation ritual I could pass
I can't imagine a better output for llms than python. not because its particularly good. far from it, its got dynamic typing and more or less sets you up for runtime failure. however, it has probably the largest corpus of training data aside from javascript.
Part of my worries that all this push to LLMs will marginalize niche programming languages from being used in startups since the lack of training data means falling back to hardcoding. a skill that I have a feeling will get increasingly niche overtime. I feel capitalism will basically render programming languages into a build artifact overtime.
Because the training set is very good. Then ask to rewrite in rust
Isn’t the answer usually - because the same ai said python is the right language for it?
Honestly I am in the exact same boat thinking why I don’t write in C if Claude is writing it. However I chickened out thinking if support for ml model or llm based flows doesn’t exist in c then it will be time consuming to go to python then.
Didn’t Tencent do a study comparing AI performance across about 20 languages showing that Elixir was the top performer?
Yeah, last year I discovered that AI writes better rust than C, so I switched to rust and it made some quick good code that it couldn't do in C.
But when I wanted to optimize and edit and reorganize bthe code it was difficult, so I did a rewrite in C and it was lighter and faster and simpler and less headache.
C for humans, rust for AI.
AI/ML stuff: Python
Personal: Rust/Go based on criticality of being able to glean code quickly, or memory usage, etc
Python is incredibly readable too. I can scan through LLM Python changes in minutes instead of hours of other languages.
"The Python ecosystem is increasingly a Rust ecosystem wearing a Python hat"
If anything this is a reason to keep using Python.
Most of the article makese sense but what is this supposed to mean? "Native Rust binaries are hostile to serverless runtimes" . I don't think that is true.
Thats exactly what i did with https://panel-panic.com
What are some concise languages that are well received by humans (on par with Python)? Token efficiency might be a marked advantage.
Clojure comes to mind at least.
Because AI creates unmaintainable messes in any language, and ergonomic ones help humans clean up.
Bullshit article. AI is not meant to be a black box, you just spit at it and it'll generate you a whole app and you don't even understand a single line. That WILL eventually fail. There was an article here some time ago where someone described it pretty well "use AI as autocomplete on steroids". Therefore, use any language you can actually debug well and know well and use AI as a tool, not as your replacement. And don't use it to port your electron app to rust if you don't know rust, Jesus.
So he includes Go in a list of languages that apparently makes development slow and have “a build system that fought you” and then says python was the solution for all that. I think he got it backwards. I have found the Python build system horrific and broken by default while Go just works.