EO Erik Onarheim Erik Onarheim Software developer in Minneapolis who created Excalibur, an open source game engine for the web.

“As a member of a company that has built several JSON-based DSLs, that is a mistake always. I don't think there's ever a good time for you to make your own programming language shoved into JSON. Is this a bug in the program I wrote in this JSON programming language? Or is it a bug in the compiler of my proprietary language? And the answer is, I don't care. That sucks. I don't want to be debugging a compiler to solve my business problem.”

TypeScript.fm - The Friendly Show for TypeScript Developers · Hands-On Engineering Podcasts · November 2026

“As a member of a company that has built several JSON-based DSLs, that is a mistake always. I don't think there's ever a good time for you to make your own programming language shoved into JSON. Is this a bug in the program I wrote in this JSON programming language? Or is it a bug in the compiler of my proprietary language? And the answer is, I don't care. That sucks. I don't want to be debugging a compiler to solve my business problem.” — Erik Onarheim, TypeScript.fm - The Friendly Show for TypeScript Developers

Context

Kamran had said a new TypeScript release could let people write type-checked DSLs, noting Erik is against private DSLs. Erik explains the objection from experience.

Transcript

TypeScript.fm - The Friendly Show for TypeScript Developers Around 55:20 into the episode
Erik Onarheim

Yes. Right. I do.

Kamran Ayub

…verify them or like they're not type checked. Right. But now imagine a world where you could safely write your own DSL that is type checked as part of TypeScript. That's there maybe still not great. You probably don't want to create a DSL, but if you have to, then that might be one way to do it.

Erik Onarheim

Yeah. I think where I come from is as a company, as a member of a company that has built several JSON-based DSLs, that is a mistake always. I don't think there's ever a good time for you to make your own programming language shoved into JSON, and then you have to debug. Is this a bug in the program I wrote in this JSON programming language? Or is it a bug in the compiler of my proprietary language? Or is it a bug in my implementation in this proprietary language? And the answer is, I don't care. That sucks. I don't want to be debugging a compiler to solve my business problem. So I say DSLs are good and fine as long as I can write tests and put a breakpoint in it.

Kamran Ayub

Well, nowadays it is, is it a bug in my vibe-coded like vibe-coded programming language DSL?

Erik Onarheim

Yeah. So, yeah, DSLs and I don't have, aren't friends. Let's say we have a strained relationship. Now, if you got strong types and it's well suited, they can be good. If it's not, it can be like the worst experience of your life. That's

Kamran Ayub

so true. How's everything else going?

Speaker names come from our own diarization. The position is estimated from where the line sits in the episode.

More from TypeScript.fm - The Friendly Show for TypeScript Developers