Skip to content
Rutger Hemrika
Menu
← Blog

Programming languages in the AI era · 2/8

TypeScript or Go? The Tie at the Top Is Actually Two Different Bets

Rutger Hemrika8 min read

Originally written for the programming-languages-ai-era research project.

The tie that isn’t actually a tie

TypeScript and Go are tied at 4.01 in my framework, and the tie is the most interesting finding in the cohort. A weighted matrix that ranks ten languages on eleven dimensions and produces an exact-decimal tie at the top looks, at first read, like the framework refusing to commit. It is the opposite. The tie is telling you the question matters more than the language. Once you read the cells underneath the weighted total, the two scores stop being equivalent. Go and TypeScript are answering different questions. Each is the cleanest answer to its own. The reason CTOs and VP-Engineering readers should care: if you adopt one as if it were a generic top-of-table choice, you bet wrong on the workload, not on the language. The framework version is v0.6 and the rest of this piece is the decision rule that falls out of it.

Why the tie isn’t ambiguous

Human cognition4.0 / 5.0Machine cognition4.0 / 4.0AI-agent operability5.0 / 5.0Runtime and ecosystem4.0 / 4.0Strategic viability4.0 / 4.0AI-systems native1.5 / 2.0AI-systems ecosystem5.0 / 3.5Structured-output native2.5 / 3.0Structured-output ecosystem5.0 / 3.0Ecosystem dependency risk3.0 / 3.5Reachability to top tier4.0 / 3.5TypeScriptGo
TypeScript against Go per dimension. Same total, different shape.

The numbers diverge sharply once you look at the cells.

Cell Go TypeScript What it measures
HC — Human Cognition 5 4 readability, governance
MC — Machine Cognition 4 4 static analyzability
AO — AI-Agent Operability 5 5 agent loop closure
RE — Runtime/ecosystem 4 4 production deployment
SV — Strategic Viability 4 4 stewardship and forward fit
AIN — AI-Systems Native 2.0 1.5 first-party AI surface
AIE — AI-Systems Ecosystem 3.5 5.0 third-party AI surface
SON — Structured-Output Native 3.0 2.5 first-party schema surface
SOE — Structured-Output Ecosystem 3.0 5.0 third-party schema surface
EDR — Ecosystem Dependency Risk 3.5 3.0 backer-mix resilience
RCH — Reachability to Top Tier 3.5 4.0 forward-trajectory plausibility
Weighted 4.01 4.01 dimension-weighted sum

Go’s lead is on the language-and-toolchain half — Human Cognition (HC=5, alone at the cohort ceiling) from a deliberately small surface, and AI-Agent Operability (AO=5, tied with TypeScript and reached by no other language) from a single canonical command and a single canonical formatter. TypeScript’s lead is on the AI-application half — AI-Systems Ecosystem (AIE=5.0, tied with Python and reached by no other language) and Structured-Output Ecosystem (SOE=5.0, again tied only with Python). TypeScript is the only language in the cohort other than Python to hit both ecosystem ceilings. Same weighted total. Different shapes. Different bets.

Buridan’s ass starved between two equal bales of hay. The matrix hands you two equal bales and a rule for choosing; the rule is the point, not the tie.

Profile A — Go is the cleanest backend-services bet

Read the Go column from a CTO lens and the picture is unambiguous: Go has the cleanest agent loop in the cohort because it has the cleanest toolchain in the cohort. go build, go test, go vet, go mod is a single canonical command surface. No project-tooling debates, no Maven-versus-Gradle, no setuptools-versus-Poetry-versus-uv — one path, documented by the same team that ships the compiler. Minimum-version-selection in go mod resolves the lockfile-version-skew problem without a lockfile dance. gofmt is enforced convention, not a stylistic option, which means agent-generated code lands on the same canonical layout as human-generated code on first commit. gopls is the official Language Server Protocol implementation, focused, and shipped by the language team. Runtime simplicity translates directly: a single static binary, no GIL contention, deployment surface that fits a Kubernetes manifest in twenty lines. The operational wins compound where the agent’s job is “ship a service that runs reliably.” Kubernetes operators are written in Go. Most of the Cloud Native Computing Foundation’s load-bearing infrastructure — etcd, containerd, Helm, Prometheus, Kubernetes itself — is written in Go. Command-line tools that ship as a single binary default to Go. Stateless services that need to run unattended at scale default to Go.

The dependency-risk profile reinforces the bet. Go’s Ecosystem Dependency Risk score is 3.5, mid-pack, anchored by Google’s stewardship of the language itself and by commercial-first-party Anthropic Go and OpenAI Go SDKs — the load-bearing layer between Go services and frontier models is vendor-stewarded, not single-maintainer. Where Go is the right answer: backend agentic infrastructure where the agent’s job is to ship a service that runs reliably under SRE supervision and survives a five-year operational horizon.

This is wrong if your agent’s primary job is calling LLMs and parsing structured outputs. Go’s encoding/json with struct tags is type-safe but the validation ecosystem is fragmented across go-playground/validator, ozzo-validation, and invopop/jsonschema, with no clear Pydantic-or-Zod equivalent. The LLM-specific ergonomics layer is thin. LangChainGo lags LangChain.js and LangChain Python in feature breadth. Pick Go for the service. Do not pick Go for the prompt-engineering supply chain.

Profile B — TypeScript is the cleanest AI-application bet

Read the TypeScript column from the same CTO lens and a different picture sharpens. AI-Systems Ecosystem score 5.0 — the cohort ceiling, with no language other than Python reaching it; the next-highest is Java and Rust tied at 4.0. The libraries underneath the score are all first-party from the vendors that matter: the official Anthropic TypeScript SDK, the OpenAI Node SDK, LangChain.js as the canonical TypeScript LangChain port, the official MCP TypeScript SDK with Anthropic co-stewardship, and a TypeScript LlamaIndex distribution. The Vercel AI SDK extends the structured-output surface with generateObject and streamObject. Structured-Output Ecosystem score 5.0 rests on Zod as the de facto schema-validation standard for the language, ArkType emerging as a high-performance alternative, zod-to-json-schema feeding tool-call definitions into LLM APIs, and native compile-time inference via z.infer. The same Zod schema flows through the Anthropic SDK’s tool-typing surface, the OpenAI SDK’s structured-output mode, the Vercel AI SDK’s generateObject, and the application’s own boundary validation. One schema, four surfaces, full type inference end to end.

Operability comes through on the same toolchain-unification axis Go wins on, just from a different starting point: the Microsoft-maintained TypeScript Language Service over the Language Server Protocol that Microsoft itself originated, with strict mode and discriminated unions giving agents a deep semantic model to reason about. AI-Agent Operability score 5 ties Go. The end-to-end agent loop in TypeScript stays in one stack: the front end, the back end, the agent, and the structured outputs all share the same types from a single tsconfig. A startup that ships a chat interface plus an agent backend plus a tool-call surface in TypeScript is running one type system, not three. The polyglot interaction surface that punishes Python-plus-TypeScript stacks does not exist when both halves are TypeScript.

This is wrong if your dependency-risk profile cannot tolerate single-maintainer load-bearing libraries. Zod is one bus-factor event from being a strategic problem — Colin McDonnell carries the load, and Microsoft’s stewardship of TypeScript does not extend to Zod. TypeScript’s Ecosystem Dependency Risk score is 3.0, sitting in the lower third of the cohort (only Python’s 2.5 is lower) and well below .NET’s 4.5, precisely because of the structured-output anchor. A risk-conservative reader can buy ArkType-plus-Zod redundancy as a hedge, but the hedge is the kind of thing that wants a paragraph in the architecture decision record.

The decision rule

If the agent’s job is to ship a stateless service, fix a CI pipeline, refactor a Kubernetes operator, or write a CLI, default to Go. If the agent’s job includes calling LLMs, parsing structured outputs, running prompt evaluations, integrating with vector stores, and stitching tool calls, default to TypeScript. The split is not a near-decision. The cells make it explicit: HC=5 plus AO=5 versus AIE=5.0 plus SOE=5.0 — two different leading edges of the same 4.01.

If your team builds both — typical at AI-product startups — you will run both languages. The polyglot interaction surface is part of the work, not a failure of language choice. Treating it as a failure produces the wrong remediation: a forced single-language consolidation that pays a penalty on whichever profile the surviving language does not lead.

If your risk model values vendor-backed stewardship over ecosystem breadth, .NET (3.99 — third in the cohort, 0.02 behind the joint leaders; EDR=4.5, alone at the cohort ceiling, with no other language reaching it; and Reach=4.5, also alone at the cohort ceiling) is the third profile — vendor-anchored AI-application work via Microsoft Semantic Kernel, Microsoft.Extensions.AI, ONNX Runtime .NET, and the MCP C# SDK with Microsoft co-maintenance, and the strongest forward bet in the cohort. That is the subject of piece 4.

What’s wrong if I’m wrong

Two failure modes collapse the binary.

If a single language ships native AI-systems primitives that close the gap — Microsoft adds first-party Anthropic .NET, Apple opens MLX cross-platform, or Google ships an official Go LangChain with Anthropic and OpenAI partnership — the binary collapses to one default. The native/ecosystem split that gives TypeScript its current AIE lead is a property of who ships first-party code today; a steward shipping a credible first-party AI runtime moves the cell, and the matrix moves with it.

If structured-output ergonomics stop being load-bearing — because frontier-model APIs ship native typed-output modes that bypass Pydantic and Zod for the common case — the SOE=5.0 advantage collapses into a smaller margin. Anthropic’s structured-output surface and OpenAI’s structured-outputs API are already moving in this direction. The 18–24-month bet on Zod as load-bearing infrastructure is plausible. It is not certain. The framework version snapshot matters. The eight predictions I publish at the end of the series — including whether OpenAI or Anthropic ships first-party schema-validation primitives that supersede Zod — are the testable form of this hedge.

Closing

The tie at the top is the framework refusing to flatten two different bets into one. Pick the workload first, the language second, and defend the bet on the cells, not the total.

Subscribe at rutgerhemrika.substack.com for piece 3 — the Python paradox: deepest AI-systems ecosystem in the cohort, mid-pack overall score, and what the EDR and AIN halves of the row are doing to the weighted total. If you want the underlying data, claims, and sources, the framework is open at github.com/hemrika/programming-languages-ai-era.


The tie is the answer. Read the cells, not the total.

David Brent would have called the tie a win-win. It is two different bets with the same score, and the only losing move is pretending the score decided it.

References

The allusions and quotations in this piece, with their origin:

  • The Office (BBC, 2001-2003): David Brent.
  • Buridan’s ass, the medieval paradox of a choice between equal options, attributed to Jean Buridan (14th century).

Rutger Hemrika

AI strategy and governance for vertical-market software. Writes from building, not from slides; every claim carries an evidence grade.

Full experience · About