5 ms·
The problem with using LLMs to write Javascript is that they’re trained on Javascript written by humans. Which is not the training corpus I’d choose to teach a
by antonvs 11d ago
The problem with using LLMs to write Javascript is that they’re trained on Javascript written by humans. Which is not the training corpus I’d choose to teach a neural net to write code.
- AnimalMuppet 11d agoI laughed. Point noted. And yet, what do you have that's better? We could train it on a carefully-curated best-practices corpus, but that's likely to be considerably smaller. It might not have the breadth of coverage that one would wish for a training corpus.
- antonvs 11d agoI’m saying that Javascript is particularly problematic here. The comparisons to “function” in the examples above are something you’d be unlikely to see in most other languages. Using Javascript is like prompting the LLM “You are a marginally competent developer…” Not that there are no good Javascript developers, but the average quality of JS code tends to be lower, encouraged by the language’s many misfeatures. I’ve seen an LLM fix an import error in Python by wrapping it in an exception and trying a different import if it fails. Again, this is a function of the language’s weaknesses. In languages with good module systems, an LLM couldn’t do this because it’s typically not an available feature.
- tosti 11d agoWell then you'd have somewhat of a chicken-and-egg problem. But humans came first so at least there's that.