The Compiler Is Your Best Friend
The Compiler Is a Tireless Reviewer of AI Generated Code
Quick scope check before we dive in. If your domain has already chosen your language for you — you’re in ML so you’re on Python, you’re on the frontend so you’re on TypeScript, your entire team knows PHP and a rewrite isn’t happening in this lifetime — this post isn’t for you. I’m talking to the people with a blank canvas. Greenfield project, flexible team, genuine choice on the table. If that’s you, keep reading.
The Old Complaint
For teams with a genuine choice, the knock on strongly typed compiled languages like Go, Rust, Java, and C# always came down to two very human gripes.
First, the overhead of defining types up front. Requirements are fuzzy, everything is changing, and you just want to see if the idea works. Defining types on half-baked code feels like ironing your shirt before you’ve decided if you’re going out.
Second, the compile step. Dynamic language developers had a beautiful, frictionless feedback loop: save the file, refresh the browser, see the result. Compiled language developers had: save the file, wait, fix the error, wait again, refresh, see the result. Across a full day of iteration that friction compounds. It’s not one paper cut — it’s a thousand of them.
Both were legitimate complaints. They’re also both largely gone now.
AI Took Away Those Excuses
AI can handle the type definitions you didn’t want to write. You describe what you want, the AI writes the struct, the interface, the function signatures. Your AI doesn’t cut corners and has never once thought “I’ll just use any here and fix it later.”
The compile step problem is subtler but real. When AI is generating your code, a meaningful chunk of iteration happens in the conversation before you ever hit compile. You’re not in a write-compile-fix loop anymore. You’re in a describe-generate-review loop, and then you compile once you’re reasonably confident. You can even get AI to compile the code first before it declares the job done.
So if both reasons engineers reached for dynamic languages have been largely addressed, what are you left with? All the benefits of a compiler — and right now those benefits matter more than ever.
The Compiler Is a Tireless Reviewer
Here’s the thing about AI generated code: it’s fast, it is occasionally, confidently wrong in ways that look completely right at first glance. AI hallucinates. It passes the wrong type into a function, references a variable that doesn’t exist, writes a function signature that almost matches what you need but not quite.
A compiler catches that whole class of bugs before they ever leave your laptop. Wrong types, mismatched signatures, undefined variables — dead on arrival at build time. The compiler doesn’t care that it’s 4pm on a Friday.
One thing the compiler can’t do: save you from bad business logic. If your discount function is calculating the wrong percentage, it’ll happily ship that bug to production with a smile. But eliminating an entire layer of preventable, AI-hallucination-class bugs before they touch production? That’s a free guardrail you’d be crazy to leave on the table.
“But Dynamic Languages Have Typing Now”
You’re thinking about TypeScript. PHP’s declare(strict_types=1). These are real and genuinely useful — I’m not here to dismiss them.
But optional typing is a cultural enforcement problem, not a technical one. And culture, as any engineering manager who has survived a deadline crunch knows, is the hardest thing to hold together under pressure. The moment a sprint gets hairy, someone skips the type annotation. Then someone else does. Then it’s a pattern. Then you look up six months later and half your codebase is untyped.
Optional typing is like a gym with an optional cardio policy. Sure, technically everyone could do cardio. A compiled strongly typed language has no optional cardio policy. The compiler is the policy.
So What Should You Actually Do?
First choice: Pick a strongly typed compiled language your team can hire for and live with. Go, Rust, Java, C#, Kotlin — pick your fighter. AI will help your engineers write it, and the compiler will help you not regret it at 2am six months from now.
Locked into a dynamically typed ecosystem? Enforce strict typing across every file from day one, at the CI level, no exceptions blessed by anyone including you. Do not plan to “add types later.” Later is a lie you tell yourself before a deadline and forget about immediately after.
The Tradeoff No Longer Holds
This isn’t an argument that dynamic languages are bad — they built the internet and will outlive this post. This isn’t an argument that AI is untrustworthy — it’s excellent most of the time and getting better every month.
This is a narrower argument for teams with a real choice in front of them. The two things that made strongly typed compiled languages feel expensive — type overhead and compile friction — have both been largely addressed by AI. What you’re left with is a choice between a codebase with a compiler watching your back and one without.
The cost disappeared. The benefit didn’t.
Why would you choose without?
As always, ship it.
Matthew

