logoalt Hacker News

khueytoday at 5:49 PM3 repliesview on HN

One obvious reason to have an LLM output a high level language even if you are never going to read the code is because it will require fewer output tokens and therefore be cheaper.


Replies

preg_matchtoday at 5:57 PM

Typescript is not meaningfully a higher level language than Java, C#, or even Rust. Typescript exists for exactly two reasons:

1. JS is a privileged language and allows you to tap into web and node

2. Type safety is good

But TS is not a good language overall. It's just much slower than alternatives and much less safe.

Gormotoday at 6:21 PM

It's not immediately clear to me why having an LLM output code in JS or Python should inherently consume more tokens than C or assembly. I'd expect token usage to correlate with the complexity of the algorithm being implemented, not with what specific language syntax it's being implemented in.

But either way, token consumption is only a relevant concern if you still expect to be using SaaS LLMs by the time you're ready to have them target lower-level code for you.

senderistatoday at 5:56 PM

If LLM-generated code continues the human pattern of having roughly the same rate of bugs/LOC regardless of language, then I also expect LLM-generated code in high-level languages to be less buggy.

show 1 reply