Comment by dbbk
4 months ago
LLMs don’t even understand fucking TypeScript, which you would expect a computer program to be able to understand. I can’t get it to write valid Drizzle code to save my life, it will confidently hallucinate method imports that don’t even exist.
fucking real, i've had claude code make obvious syntax errors in C# by declaring a tuple as `var (a, string b)` which i thought we were past.
The question is which LLM, invoked how?
Claude Code refactored numerous projects for us into TS, often one-shotting it. Saying LLMs don't understand TS (which may be true, in that LLMs questionably understand anything) says more about your perception than model and agent abilities.
I have also had a really hard time getting Claude and Gemini to create valid TypeScript in somewhat complex legacy projects. Sometimes it will do the most kludgey things to sort of make it work (things a human developer would never consider acceptable).
Right, LLMs don't understand TS, because they're not integrated with it. When they come across something they don't know, they just start hallucinating, and don't even verify if it's actually valid (because they can't)
LLMs can't, but agents can. They can read documentation into context, verify code, compile, use analysis tools, and run tests.
Hallucinations do occur, but they're becoming more rare (especially if you prompt to the strengths of the model and provide context) and tests catch them.