Summarizer

TypeScript Architecture Choices

Surprise and discussion about Claude Code being built in TypeScript on Bun rather than Python, Rust, or C++

← Back to The Claude Code Source Leak: fake tools, frustration regexes, undercover mode

The decision to build Claude Code on the Bun runtime using TypeScript has sparked a lively debate over the trade-offs between performance, developer productivity, and ecosystem strength. While some users expressed shock that high-performance alternatives like Rust or C++ were bypassed, others defended the choice by highlighting TypeScript’s robust type system and its superior concurrency features compared to Python. The discussion also centers on a "chicken-and-egg" theory regarding Anthropic’s acquisition of Bun, with some suggesting the tech stack was a strategic move driven by specific engineering expertise. However, skepticism remains, as critics pointed out the irony of using a traditionally web-focused language for a closed-source, obfuscated tool that has already faced scrutiny for its impact on local system configurations.

15 comments tagged with this topic

View on HN · Topics
I am still just shocked that Claude Code was written in Typescript, not C++, Rust or Python. It also somehow messed up my alacritty config when I first used it. Who knows what other ~/.config files it modifies without warning.
View on HN · Topics
I'm surprised Python is on that list. TypeScript doesn't seem like a terrible choice, as it can leverage vast ecosystems of packages, has concurrency features, a solid type system, and decent performance. C++ lacks as robust of a package ecosystem, and Python doesn't have inbuilt types, which makes it a non-starter for larger projects for me. Rust would have been a great choice for sure.
View on HN · Topics
Python and C++ have been used for countless large projects— each one for many more than typescript. It’s all about trade-offs that take into account your tasks, available coders at the project’s commencement, environment, etc.
View on HN · Topics
> I'm surprised Python is on that list. I mostly mentioned it because it is pre-installed on some (linux) systems. Though of course if you're trying to obfuscate the sourcecode you need to bundle an interpreter with the code anyway. But it has historically been used for big programs, and there are well established methods for bundling python programs into executables.
View on HN · Topics
>Python doesn't have inbuilt types Technically, neither does JavaScript.
View on HN · Topics
Well, nobody mentioned it technically. Like nobody mentioned Assembly but it is under the hood.
View on HN · Topics
Boris Cherney is author of a oreilly book about typescript
View on HN · Topics
Yeah, this seems like a personal choice, which does work out given the current result.
View on HN · Topics
Anthropic acquired Bun. Clearly, Bun is not a runtime for C++, Rust, or Python. For an engineering project, strongly typed TypeScript was basically the only possible choice for them.
View on HN · Topics
Anthropic acquired Bun after making Claude Code.
View on HN · Topics
I am not following your logic. Anthropic acquired Bun and so all of their end-user software should use it? Or am I missing sarcasm?
View on HN · Topics
Why do you think they acquired Bun. To look at it? Also you needed a leak to know that CC, that is out for 1 year, is in TS?
View on HN · Topics
> Why do you think they acquired Bun I don't know why they acquired Bun. Surely not because there's no other means to write command line programs. > Also you needed a leak to know that CC, that is out for 1 year, is in TS? What, are you shaming people for not being aware what (obfuscated) code some 1 year old software is written in?
View on HN · Topics
wow, it's also not like their code was actually good (though this apply to most enterprise software). To hide a client behind closed source (it's also typescript, so even more baffling) is laughable behavior.
View on HN · Topics
Sounds like there's still a lot of value in Typescript (otherwise they could have open sourced.) Plus there's demand for skilled TS software devs that don't ship your company's roadmap using a js.map 20,000 agents and none of them caught it...