AI code generation reliability is a function of training-corpus density for the target language: models hallucinate on obscure or new languages with small corpora while performing well on C++ because of its massive existing corpus.
Suggests that choosing a language, DSL, or internal framework is now also a decision about how much AI leverage you get for free; low-corpus targets silently degrade agent reliability and increase hallucination risk in codegen, refactoring, and migration tasks.
For any agentic system operating in a domain (language, API, DSL, tool schema), evaluate expected model competence by the density of training data for that domain before assuming generic model capability transfers.
AI hallucinates when given obscure or new languages with small code corpora.
C++ code benefits from massive existing corpora for AI training, making AI better at C++ than obscure languages.