4 ms·
No reason, unless the project is simple. The more you can offload onto your compiler/typer - the shorter is the feedback loop, the better agents work. Lack of
by pshirshov 5mo ago
No reason, unless the project is simple. The more you can offload onto your compiler/typer - the shorter is the feedback loop, the better agents work.
Lack of strictly enforced static typing make agents fail much sooner with Python. In my opinion, Rust and Scala are the best targets for agentic flows - and, coincidentally, they have the most advanced typers among mainstream languages.
But any statically typed language behaves better than any dynamically/duck typed language. When I say "better" I mean delivery time and the amount of shipped defects.
Another thing which helps (but not generally applicable) - ask your agent to verify critical protocols with formal proof in TLA+/lean/coq. Agents are bad at formal proofs - but generally are much better than most of the humans.
- echelon 5mo agoRust is a fantastic language to emit from AI. Studies report that the language design tends to result in lower defect code (vs peers such as Go and Java) due to how the syntax aids error handling, logic flow, and API design. You don't need to know Rust to begin using it. You'll learn it quickly enough. The code is easy to read, and Serde makes parsing, especially JSON, extremely pleasant. Writing HTTP services is a breeze. AI makes Rust development go 10x faster. The borrow checker isn't even an issue. It's invisible now. You almost never hit it anyway when you write web services, but now it's no issue at all when writing highly concurrent code too. Claude etc. emit the correct code and lifetimes, and it's entirely ergonomic and idiomatic. The biggest problem with Rust is the compile time.
- oblio 5mo ago> AI makes Rust development go 10x faster. The borrow checker isn't even an issue. It's invisible now. What happens when things break and the AI agent can't fix it?
- jmalicki 5mo agoThat would be bad, which is why Rust is preferred to python. In Rust when things break the AI gets a clear error message that makes it clear how to fix. In Python when things break, the AI will randomly spin its wheels for days trying different things without being able root cause the issue. A failure to compile is by far the easiest thing for the AI to fix.
- echelon 5mo agoYou'll learn Rust faster with AI and should be able to solve it yourself. You're unlikely to wind up in such a situation though. The design work Claude does in Rust is really sensible and idiomatic, and I really don't think you'll be unable to refactor or redesign things. Claude is extremely good with Rust generation, refactoring, and manipulation. I'll go as far as to say that AI has removed most of the complaints people had with learning or using Rust. It's not even a speed bump now.
- therouwboat 5mo agoCome on now, how do you learn anything if you just tell claude to do something and feed it error messages?
- Yokohiii 5mo agoYeah, I don't think you really learn a language with agentic coding, at least you wont become fluent writing it. I currently use copy pasta chatbot help to write some C code and I am still often stuck how to progress manually. And I refactor a lot because the LLM code is subpar for me.
- echelon 5mo ago> Yeah, I don't think you really learn a language with agentic coding > [...] > And I refactor a lot because the LLM code is subpar for me. This is learning.
- Yokohiii 5mo ago> Yeah, I don't think you really learn a language with agentic coding, at least you wont become fluent writing it. Don't misquote me for your agenda. It's a statement about the quality of learning.
- echelon 5mo agoI'm presuming you don't like AI (apologies if I'm mistaken). Just because someone doesn't like some tool doesn't mean someone can't learn using the new tool or method. Users of an old technology often adopt a hostile disposition of a new technology that threatens their skill. To claim people can't learn at a higher level of abstraction is absurd. Kids with motivation are smart, and they will outpace the older generation. If I had the advantage of LLMs and agentic coding when I was a teenager, I could have gone wider and deeper in my career. I'm jealous that young learners are going to be able to do more than I could at their age. I'm happy for them. If you're using AI to vibe code, then editing the results - that's learning. Period. That's a feedback loop. And it's probably more interesting and rewarding than what we had.
- joaohaas 5mo agoWhat study? And I don't see how Go design patterns would be any worse. The main issue people have with it is the repetition/verbosity, which LLMs handle just fine.
- ModernMech 5mo agoThe repetition and verbosity makes it more expensive for the LLM to write. You'd want a language that is expressive and dense if you're optimizing for token usage.
- bombcar 5mo agoAPL would seem to be perfect!
- tdeck 5mo agoWhat if you want to offload a lot of the work to libraries rather than generating (and presumably reviewing?) it yourself? Python has a very strong ecosystem of useful libraries because it's been around so long and is popular in a number of application domains.
- pshirshov 5mo agoWell, Python is not the only language with a mature ecosystem. Also, in many cases it's cheaper to rewrite a small lib instead of fighting crappy code - but that applies regardless of the target language.
- petra 5mo agoYou could use Scala, get the strong typing, but also get access to the Java and also Python/JS libraries and others via various interop mechanisms Java has.
- bombcar 5mo agoAnd you also get compile times so long you’ll never run out of tokens! I kid, I kid, but seriously …
- beastman82 5mo ago"sbt --client" is really fast for me, and I'm using derivation and implicit scope etc. super warm JVM, incremental compiles.
- qoez 5mo agoI feel like types doesn't really make a difference in this context. Types are good for enforcing standards between in a multi human situation, but AI doesn't really make the same mistakes that warrants it.
- pshirshov 5mo agoModels are trained on human data and they make exactly the same mistakes - and a lot of mistakes humans don't usually make. Also they are extremely bad at high-level design.
- weberer 5mo ago>Lack of strictly enforced static typing make agents fail much sooner with Python. Just tell your agent "Use type hints. Add a pre-commit hook to run ruff, black, mypy, and pytest." It will save you 99% of headaches.
- pshirshov 5mo agoI've tested many flows involving linters. Results are far from ideal - agents tend to work around linters, mass-add ignore annotations, etc, especially in situations when fixing one warning/error triggers another (and that happens regularly).
- the_af 5mo agoWhat if we tell the agent NOT to add ignore annotations (or to ask about them if there's no other reasonable way to proceed)?
- pshirshov 5mo agoThey tend to ignore such instructions on first circular issue - even with Opus you have to kick it really hard, insist on generalization and intervene manually. In my opinion this is not a productive/workable approach for large projects. Typical failure mode: "I fix pyright error A, it causes pyright error B, pyright is broken, I will exclude both A and B through pyright config and will add ignore annotations for both A and B and will write a couple of idiotic comments about that".
- codybontecou 5mo agoYou're devolving into the realm of "What if we tell the agent to just get it right?" Relying on the prompt to ensure the code it writes is correct is where things fail. Types, tests, linting, etc. are deterministic tools the agents tend to respect.
- jimbokun 5mo agoLLMs really are just like an intern in their first coding job!
- empath75 5mo agoI would argue that you should use python if the LLM is writing code for a non-programmer to understand and contribute to. Ie: things like notebooks.