Greg Blake Greg's World
Greg's Best Of Wisdom · AI

The Best Programming Languages When AI Writes the Code

AI coding agents now write most of the code on many projects. Here is which language to pick for each kind of application when your teammate is an AI, from TypeScript for the web to Rust when speed and safety matter most.

By Greg BlakeOctober 3, 20265 min read

With tools like Claude Code, Codex and Cursor, a lot of software is now written by AI agents while people describe, review and test. That changes the old question of "which language should I learn?" into a new one: which language should I ask the AI to write in? The answer depends on what you are building. These are my picks for each kind of application, and why.

The short answer

  • Websites and web apps: TypeScript.
  • AI, data, automation and prototypes: Python.
  • Back-end services and command-line tools: Go.
  • Systems and maximum performance: Rust.
  • Phone apps: Swift for iPhone, Kotlin for Android.
  • Enterprise and games: C#.

What makes a language good for AI-written code

Three things matter most. Lots of public code, so the model has seen every pattern many times. Fast, clear feedback, from a compiler, type checker or test run, so the agent can find and fix its own mistakes in seconds. And code a person can still review, because you own whatever the AI writes. The research backs this up. A 2026 benchmark that had Claude Code build the same small project in 13 languages found Ruby, Python and JavaScript the fastest and cheapest. A separate study of AI-written chess engines in 17 languages found the agents could produce working code in nearly any language, but only mainstream compiled languages reached top playing strength.

The picks

1TypeScript

Best for websites, web apps and full-stack applications

The default for anything that runs in a browser. TypeScript is JavaScript with types, and it runs everywhere: front ends in React or Vue, back ends in Node, desktop apps and even serverless functions. AI agents have seen an enormous amount of it, and the type checker catches the mistakes AI tends to make in large projects, like calling a function with the wrong data. For a quick prototype plain JavaScript is a little faster for the AI to write, but for an app you will maintain for years, TypeScript is worth it.

2Python

Best for AI and machine learning, data analysis, automation and prototypes

The language of AI itself, and the quickest for an agent to get right. In the Claude Code benchmark, Python passed every test and was among the fastest and cheapest languages. Every AI library, from PyTorch to the model providers' own SDKs, is Python first, and it is ideal for scripts, reports, data pipelines and internal tools. For big, long-lived Python projects, ask the AI to add type hints and check them with a tool like mypy.

3Go

Best for back-end services, APIs, cloud tools and command-line programs

Go is a small, plain language on purpose, and that suits AI well: there is usually one obvious way to write something, so the code an agent produces looks like the code an experienced engineer would write. It compiles in seconds, gives clear error messages, and builds into a single file that is easy to deploy. Many of the tools that run the cloud, including Docker and Kubernetes, are written in Go.

4Rust

Best for systems software, high performance and safety-critical code

When speed and reliability matter most, choose Rust. Its strict compiler refuses to build code with whole classes of memory and threading bugs, which is exactly the safety net you want when an AI is writing low-level code. The trade-off is that agents take longer and cost more to get Rust right, so it is overkill for a simple web app. For engines, embedded devices, security tools and anything that must never crash, it is the best choice.

5Swift and Kotlin

Best for native phone apps

For apps on the App Store or Google Play, use the platform's own language: Swift for iPhone and iPad, Kotlin for Android. Both are modern and well supported by AI agents, and they give you full access to each phone's features and the smoothest performance. If you need both platforms from one code base and the app is fairly simple, a TypeScript framework like React Native is a reasonable alternative.

6C#

Best for enterprise business systems, Windows and games

C# and Microsoft's .NET power a huge share of corporate business software, and C# is the language of the Unity game engine. It is strongly typed, mature and very well supported by AI tools. If your organization already runs on Microsoft, C# lets AI-written code fit right in with what your team knows.

Side by side

ApplicationBest languageWhy it suits AI
Websites and web appsTypeScriptHuge training base, types catch errors
AI, data, automationPythonFastest and cheapest for agents
Back-end services, CLIsGoSimple, fast builds, clear errors
Systems, performanceRustThe compiler is a strict safety net
iPhone and Android appsSwift, KotlinNative features and speed
Enterprise, Windows, gamesC#Mature, typed, fits Microsoft shops

How I would choose

  1. Choose a language your team can review. The AI writes the code, but people approve it, support it and fix it at 2 a.m. If no one on the team can read Rust, don't ship Rust.
  2. Prototype dynamic, maintain typed. Python or JavaScript for a quick experiment. TypeScript, Go or typed Python when it becomes a real product.
  3. Give the AI a fast test loop. Ask for tests first and make them quick to run. Tests are how an agent checks its own work.
  4. Stick to popular frameworks. AI writes far better code with React, Django, Rails or ASP.NET than with an obscure library it has rarely seen.
  5. Still review for security. AI-written code can include outdated packages, leaked secrets and weak input checks. Scan it and review it like any other code.

Greg's take

My spare-time 3D site, Greg's World, is plain JavaScript written with an AI pair-programmer, and it taught me that the language matters less than the feedback loop. Give the AI clear goals, fast tests and a language your team understands, and it becomes the most productive developer you have ever worked with. Just never stop reviewing its work.

Honorable mentions

Ruby came out fastest in the Claude Code benchmark, and Ruby on Rails and is still a joy for web apps. Java remains a solid enterprise choice. SQL is the language every AI should write for your database queries. And for one-off automation on Linux and Mac, a short shell script is often all you need.


My personal opinions, not those of my employer. Not financial, legal or investment advice.