Earlier quoted context omitted.
JS is the best tradeoff between succinct and easy to understand. Python is next but has some rough edges that they avoided in JS.
You are going to have to give more support for those assertions. I write Python every day, and never would I call it a good candidate for the clankers. Pretty much any dynamic language would be ruled out, as there is too much implicit logic which makes it harder to understand what is happening.
What's the best programming language for coding agents?
51–60 of 205 posts
Re: What's the best programming language for coding agents?
#52Earlier quoted context omitted.
As much as I love Python, JavaScript (including TypeScript) is probably more popular.
That and JS code is more readily available in the source of tons of webpages, not hidden away in some backend
Re: What's the best programming language for coding agents?
#53Earlier quoted context omitted.
You are going to have to give more support for those assertions. I write Python every day, and never would I call it a good candidate for the clankers. Pretty much any dynamic language would be ruled out, as there is too much implicit logic which makes it harder to understand what is happening.
Python with a strict linter and type checker (eg ruff with the right lints on and ty with its stricter settings, or strict pyright if performance isn't too bad) works very well. Most of Python strengths (concise, large ecosystem, well represented in the LLM training data) while having good static analysis.
Re: What's the best programming language for coding agents?
#54Earlier quoted context omitted.
That and JS code is more readily available in the source of tons of webpages, not hidden away in some backend
Wouldn't most frontend JS in Web page sources be minified?
Re: What's the best programming language for coding agents?
#55Second, I am surprised that python scored slightly better than rust. My own experience is that, when programming python, Claude would spend so much more time dealing with the code not working at runtime, while for any given rust problem, rust would likely fail at compile time, iterating faster and taking less tokens. Some tasks in python it just completely failed at, writing awful garbage. I suspect that is because there is much more awful garbage written in python. (I was trying to write an AI harness. Python seemed like the obvious choice. It was decidedly not).
But in this article, python took slightly less time and tokens than rust for both experiments.
I asked Claude: could you write a decoder, from memory, in python (dont do it, just tell me if you could)
> Honestly: I could write something that's structurally right and would not decode a real .zst file.
> The control flow I'm confident about from memory — frame/block parsing, the literals section dispatch, Huffman weight reconstruction, the backward bitstream reader, the interleaved three-state FSE loop, sequence execution with the repeat-offset rules and the overlapping-copy hazard. I'd expect to get that architecture right, and it would be readable.
So perhaps asking it to do things that are in its memory is not a good benchmark. It was trained with the C "educational decoder, and every third-party port in Rust, Go, Java, JS." and offered a working link [1] to the former.
[1] https://github.com/facebook/zstd/blob/dev/doc/educational_decoder/zstd_decompress.cRe: What's the best programming language for coding agents?
#56I'd like to see the results for Ada on these same measures. On the theory that the Ada type system covers more classes of errors than other languages, and so AI can self correct better.
Re: What's the best programming language for coding agents?
#57Earlier quoted context omitted.
> I think it is able to work well with it because: > - It is a rather simple language - It has a lot of very useful libraries already built in. > With just a single main.odin file you can do a heck of a lot stuff, which LLMs seem to like. Also Wolfram/Mathematica has an insane amount of useful libraries already built in (there even exists the saying "Python is 'batteries included', Wolfram is 'spaceship included'"),…
Is there a way in Wolfram to check whether all function names exist ? And than give it as feedback to the llm?
There is a way to check whether a symbol has been defined:
ValueQ[FunctionName, Method -> "SymbolDefinitionsPresent"]
See https://reference.wolfram.com/language/ref/ValueQ.htmlReplace FunctionName by the function name that you want to check.
Re: What's the best programming language for coding agents?
#58Earlier quoted context omitted.
JS is the best tradeoff between succinct and easy to understand. Python is next but has some rough edges that they avoided in JS.
You are going to have to give more support for those assertions. I write Python every day, and never would I call it a good candidate for the clankers. Pretty much any dynamic language would be ruled out, as there is too much implicit logic which makes it harder to understand what is happening.
Re: What's the best programming language for coding agents?
#59Ive been amazed at how well LLMs are at writing Gleam[1] and Lustre[2]. Compared to a mainstream language, there is basically zero gleam code in the training data. I have no evidence to back this up, but I suspect that languages that are good for humans[3] will be good for LLMs. Compiled, strongly typed, statically typed, immutable, pure functions, pattern matched, memory safe, etc. [1] https://gleam.run [2] https://…
That's not a take I was expecting to find here. I've found most LLMs absolutely dreadful when it comes to Gleam, to the point that I most often disable even inline autocomplete when working in Gleam codebases. Too often I find them getting pulled into larger ruts in the training data and trying to insert language features that don't exist (ifs, loops, and syntactic constructs) from more popular languages like TypeScr…
What you're describing feels like my experience back in 2024/25. Back then I was using a llm auto complete or the chat interface, and I would get weird stuff all the time. (not just gleam but any language).
Re: What's the best programming language for coding agents?
#60Ive been amazed at how well LLMs are at writing Gleam[1] and Lustre[2]. Compared to a mainstream language, there is basically zero gleam code in the training data. I have no evidence to back this up, but I suspect that languages that are good for humans[3] will be good for LLMs. Compiled, strongly typed, statically typed, immutable, pure functions, pattern matched, memory safe, etc. [1] https://gleam.run [2] https://…
I think the language/syntax has an impact, but the tooling around it will be most important for LLMs, in the same way it is for humans.