Ask HN: What makes a programming language great for code generation?
3 keithasaurus 2 5/22/2025, 4:54:13 PM
At the moment, it seems programming language popularity might be the best indicator of whether an LLM will be proficient at generating working code (e.g. Python, JavaScript, Java, C). However, it seems plausible to me that languages which require the least amount of extra reasoning (and/or tokens?) could allow LLMs to produce working code more often. For instance, I would imagine immutability to be easier for an LLM to "reason" about than local mutability. The same could be said for strict formatting, explicit types, concise syntax, etc. By that reasoning I might expect functional languages to be particularly good targets.
Is there any evidence supporting these ideas? Should there be (or are there already) languages developed with LLMs in mind? Will we see developers pushed more toward languages that LLMs are more proficient at?
Ideally, you dont wanna LLM to reason. You yourself should understand the problem and the better solution for it, and then the AI just executes on it