cd /news/developer-tools/polyglot-is-the-new-compiler · home › topics › developer-tools › article
[ARTICLE · art-131833] src=mielony.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Polyglot Is the New Compiler

Haxe, the cross-platform language released by Nicolas Cannasse in 2005 and still shipping with version 4.3.7 on 9 May 2025 and a 5.0 preview on 4 July 2025, faces a challenge to its core "write once, target many" promise now that AI models generate code in multiple languages from a single natural-language description. Research cited in the piece shows the compiler's guarantee remains hard to replicate: CrossLangFuzzer found 24 cross-language compiler bugs in its 2025 paper and 32 in its 2026 report, while a study of 115 open-source codebases found C/C++ to WebAssembly cross-compilers "do not necessarily preserve code semantics when cross-compiling high-level language code into WebAssembly." SWE-PolyBench, spanning 2,110 instances across 21 repositories in Java, JavaScript, TypeScript and Python, illustrates the repository-level, multi-ecosystem tasks AI agents now target.

by read7 min views25 publishedSep 13, 2026
Polyglot Is the New Compiler
Image: Mielony (auto-discovered)

Two builds of the same app, “identical” in every code review, that quietly disagree about one number. The C++ version rounds down; the JavaScript version rounds to nearest. Both pass their tests. One user finds it six weeks later.

That gap is why Haxe exists. Whether anyone still buys the guarantee a compiler gives you is 2026’s question, now that AI made writing code cheap.

Haxe was released in 2005 by Nicolas Cannasse and still ships (4.3.7 on 9 May 2025; a 5.0 preview on 4 July 2025). Its promise: write once; a compiler turns it into JavaScript, C++, Java, PHP, HashLink and more. Haxe is alive. The question: does its problem still exist now that a model writes five languages from one paragraph?

The promise was labour, not correctness #

Haxe’s documentation reaches for time: the language exists so you can “maintain a single code-base which compiles to multiple targets,” and the benefit is that this “ultimately [saves] time and resources.” That is the product — saved effort, because maintaining the same logic in five languages is expensive. Its type system also “can detect errors at compile-time which would only be noticeable at run-time in the target language,” but that was second-order; the headline was always write it once.

Haxe leads a family defined by translation: Kotlin Multiplatform (Kotlin to JVM, native, JavaScript, Wasm), Fable (F# to JavaScript, and since version 4 to TypeScript, Rust and Python), Scala.js, Nim — different syntaxes, one idea: the abstraction lives in a compiler.

One source, or two that merely agree? #

One Haxe file, several runtimes:

#if js
return js.Syntax.code("Date.now() / 1000");
#elseif sys
return Sys.time();
#end

The #if is not a copy. It is a compile-time branch inside one type-checked program: same signature, callers and tests on every target. Ask a model for “the current time in JavaScript” and “the current time in Java” and you get two files that never mention each other — both correct, nothing proving they stay correct together. One verified source versus a pile of plausible partners — that is the seam this argument runs on.

The abstraction is moving up a level #

Typed compilers demand that you supply the source. A model removes that requirement too: supply intent in plain language, get code in any target. Surveys treat “generate new implementations from natural-language requirements in one or more target languages” as a standard task, and agent frameworks are built for cross-language generation. Once the model is the abstraction layer, the compiler’s monopoly on “write once, target many” is gone: you no longer need a single source language when you have a single source description.

The evidence: SWE-PolyBench evaluates repository-level tasks across Java, JavaScript, TypeScript and Python — 2,110 instances, 21 repositories. Orchestrators plan, build, test and cache across monorepos that “mix any combination of ecosystems — Go, Rust, Python, Ruby, PHP, JVM (Maven and Gradle), .NET, and the whole TypeScript/JavaScript family.” That makes one language to target many platforms a workaround for a constraint that stopped binding.

What the model cannot do #

That argument fails in a checkable place: translation is a semantics exercise, not a syntax one, and semantics don’t survive translation for free — compilers themselves have bugs here.

Take the JVM. Kotlin, Java, Scala and Groovy interoperate there, yet differ in type systems, nullability, generics, variance rules and method dispatch. CrossLangFuzzer attacks that boundary: 24 cross-language compiler bugs in its 2025 paper, 32 in its 2026 report, and it says compilation “must reconcile semantic discrepancies among languages.”

Or WebAssembly. Research across 115 open-source codebases found compilers cross-compiling C/C++ to Wasm “do not necessarily preserve code semantics when cross-compiling high-level language code into WebAssembly” — different standard libraries, unsupported system calls and compiler bugs, some silently changing a binary’s meaning. Silent divergence, not a crash.

Hand that to a model. A study of LLM code translation — 6,164 programs, five languages, three models including GPT-4o — is quoted for “fully automated code translation remains unreliable in practice.” Many reported failures are false, from broken evaluation harnesses; but its conclusion stands: the rest are “genuine translation limitations that reflect the inherent difficulty of cross-language semantics.” You can get labour from a model; you cannot yet get assurance.

The guarantee is the product now #

Yes, AI made the writing cheap. It did not make the proof cheap. A compiler only ever sold the second: write a program in Haxe, compile it to C++ and JavaScript, and you get two binaries provably the same program, because one source was transformed under defined semantics. Ask a model for “the same app” in both and you get two programs that look the same and might not be — the quiet kind that passes tests until a user finds it.

When AI generates a lot of code, a compiler-verified single source of truth becomes infrastructure: the more a model writes, the more you need something that can verify equivalence. The labour got cheap; the guarantee did not. Write-once languages aren’t selling “you type less”; they’re selling “your three platforms cannot silently disagree.” Kotlin Multiplatform’s marketing follows this logic — its reasons to adopt lead with reliability, and adoption more than doubled in a year, from 7% to 18% of surveyed developers. Haxe’s strongest ground is the same shape: games and engines, where one logic must run identically on console, phone and browser.

The double squeeze #

The models that make polyglot writing cheap are biased toward the languages they have seen most. A 2025 study calls this the “Matthew effect” of AI programming assistants: Python gets disproportionately strong support, while for low-resource languages “failures are dominated by compile errors.” Its conclusion: AI support “may accelerate [popular languages’] dominance while marginalizing niche languages, regardless of their technical merits.”

The skew is large: in Stack V2, ten of 619 programming languages account for over 90% of the code; Haxe lives in the long tail. MultiPL-T and Agnostics, a language-agnostic post-training pipeline presented at ICLR 2026, exist because OCaml, Racket, Lua, Julia and Fortran need manufactured training data to be usable by code models at all. No comparable effort targets Haxe.

Steel-man the other side: models keep improving at cross-language semantics, and equivalence can be checked without a shared source — generate both implementations and differential-test the pair. If that closes the gap, the guarantee is worth far less than this essay claims. It has not closed yet: the fuzzing and Wasm results above are 2025–2026 work, and differential testing still needs a harness someone maintains. But the trend runs against Haxe — and that is the strongest case against it, stronger than the labour one.

So Haxe’s labour-saving half is competed away by models that write five languages from one prompt, and those models are worst at Haxe. The honest case against Haxe isn’t that it’s bad; it’s that the market it was built for is served by something that barely notices it.

A language built to solve human problems still makes sense — but not the problems Haxe was hired for. The half that dies is the typing you save; the half that survives is the guarantee you own, moving from productivity multiplier to verification layer. Haxe makes sense where the guarantee beats the labour: engines that must behave identically across native targets, libraries with one implementation and many runtimes. It stops making sense where the labour was the point. Twenty years ago Haxe asked: why write it five times? In 2026 you might not write it even once — but you’ll still need to prove the five versions agree. That is the job the compiler never lost, and the job Haxe is now applying for.

So the practical test is narrow. Keep one verified source where a wrong-but-passing build is expensive — engines, cross-target libraries, anything with a console or a phone in its matrix — and let the model write each target separately where the labour was the point. Then do the thing neither a compiler nor a model does for you: run the versions against each other and check they agree.

References #

── more in #developer-tools 4 stories · sorted by recency
── more on @haxe 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/polyglot-is-the-new-…] indexed:0 read:7min 2026-09-13 · —