Why C# goes well with TypeScript
I just can&#x27;t see having three different general-purpose languages in my stack for a single app (narrowly defined to exclude things like administration scripts, offline data analysis, client-side apps that need ecosystem-specific languages, etc.). For anything this article would suggest using C# for, either TypeScript or C++&#x2F;Rust* ought to be good enough. The performance&#x2F;type-safety (if using TypeScript) or development-speed (if using C++&#x2F;Rust) costs seem unlikely to outweigh the technical and operational overhead of introducing a third language with its own large distinct runtime.<p>In particular, if TypeScript isn&#x27;t performant enough for whatever I&#x27;m trying to do, then it seems likely that there&#x27;ll be more performance bottlenecks in the future, and so just moving to a generically faster language won&#x27;t be good enough; I need a language that offers precise <i>control</i> over performance, so that when future issues come up, I know I&#x27;ll be able to solve them. C# sort of has this with unsafe, but it&#x27;s a lot rougher than C++&#x2F;Rust, which is presumably why the article doesn&#x27;t mention it.<p>I could see using C# <i>instead of</i> TypeScript on the server, with TypeScript reserved for the web client only, but that&#x27;s quite a different proposition. And if I were starting a new codebase from scratch for, say, a web app, I&#x27;d just use TypeScript the whole way down, both for homogeneity and to make it easier to take advantage of server-side rendering, isomorphic business logic, etc., and drop down to C++&#x2F;Rust (via node-addon-api&#x2F;napi-rs on the server or WebAssembly in the browser) if this proved to be necessary for performance.<p>* I&#x27;d much rather use Rust, but it&#x27;s definitely the case that if you need to integrate with existing C++ code, no other language today can do that very well. I&#x27;m hoping that Rust will be able to do so in the future, so that legacy C++ apps can be ported incrementally, instead of requiring each app (or at best each large component of an app, as in Firefox) to be rewritten all at once. C++-to-Rust will probably never be quite as smooth as JavaScript-to-TypeScript or Java-to-Kotlin or Objective-C-to-Swift, but it might one day be good enough that the benefits outweigh the costs.