4 ms·
Have you worked on large (>500KLOC) codebases with an agent? Yes. But keep in mind KLOCs are not easily comparable across languages. Java is notoriously verbos
by unscaled 19d ago
Have you worked on large (>500KLOC) codebases with an agent?
Yes. But keep in mind KLOCs are not easily comparable across languages. Java is notoriously verbose. A 500KLOC codebase in Java would usually be half that size in Rust. If your argument is that large codebases makes life harder for agents, you should go with a less verbose language.
I'm not sure what "manual optimization" means (isn't it a bit of an oxymoron when the agent does it?), but if your agent has the proper tools (e.g. ast-grep, rg, semble) it can deal with large codebases. Would the agent create slop? Yes. But it wouldn't be worse on the slop that humans created on every moderately-sized Java project I've worked on.
> in fact, agent-written code in a low-level language gets pretty slow well below that size
I've never seen this happening. I've seen agents writing suboptimal Rust code (e.g. copies instead of Cow). But while this occassionally happens with Rust, I've never seen an agent optimizing for Java where necessary (e.g. using object pools to avoid GC churn). Java is not magic.
- gf000 19d ago> is notoriously verbose. A 500KLOC codebase in Java would usually be half that size in Rust Lol, no way. Especially that rust is pretty verbose all things together (which makes sense, given it's a low level language - ergo you have to literally express more things about the code)
- dwaite 18d ago> it's a low level language - ergo you have to literally express more things about the code That isn't really a comparison of the languages as much as the standard runtimes and ecosystems. It is important to consider that each have comparable components. So you aren't comparing a no_std rust project against a comparable JavaCard, but say Diesel vs Hybernate code examples around ORM.
- gf000 18d agoComparable components, but almost every line of Rust code expresses information about the lifetime of objects - either implicitly (quite often), or explicitly. Meanwhile in java it's a constant "Arc<JavaType>", and scopes don't mark "drop points"
- pron 19d ago> A 500KLOC codebase in Java would usually be half that size in Rust Ok, so you barely know either Java or Rust. > If your argument is that large codebases makes life harder for agents, you should go with a less verbose language. You mean, like Rust??? But no, that's not my argument. Agents have a hard time keeping up the architecture in large software (and the differences between verbose languages like Java, Go, Rust, and C++ vs less verbose ones like Python and JS don't make much of a difference). So they either make a mess or they do the simple thing, and the simple thing in low-level languages is often slow. > But it wouldn't be worse on the slop that humans created on every moderately-sized Java project I've worked on. Yeah, I don't think you've actually tried it. > I've never seen an agent optimizing for Java where necessary (e.g. using object pools to avoid GC churn). Java is not magic. Object pools are far less efficient than Java's GCs, but while state-of-the-art compiler and memory management technology is certainly not magic, I suggest you learn more about these things if you want to make informed decisions.