upvote
Go was originally designed as a systems language to replace C++. It's much faster than JS but also less suited for applications code in some ways. JS (or TS) is definitely not strictly better than Go or vice versa.

One less obvious advantage: Go has greenthreading which is better than JS's async-await. Rust chose async-await to avoid the runtime overhead of greenthreading, but JS has no such reason, it's just a downside.

reply
Since when did does typescript compile faster than go? I do agree typescript is a good alternative but it is very different.
reply
As someone who’s written huge amounts of Typescript, and no Go… the JS/TS ecosystem is absolutely atrocious. I’ve worked on developer productivity teams for almost a decade and JS tooling issues are a never ending battle. Every upgrade to major dependencies almost anywhere in your stack will 1. Include breaking changes and required migrations, and 2. Will also force you to update other dependencies for compatibility, which may have their own breaking changes and so on and so forth.

The tooling will let you do whatever you want, but the lack of standardization is very poor. Even now, many are switching from Eslint to Oxlint. Or Jest to Vitest. Or tsc to faster build tools. There is massive fragmentation.

I frankly yearn for a language that is always backwards compatible (JS itself might be, but ESM/CJS/etc. won’t be because the language relied on 3rd party/runtime-provided methods of importing modules for so long…), and actually has standard basic tooling from the start. Along with halfway decent security posture towards dependencies. And no need to manage a runtime. And produces smaller images.

Like if it’s just about the language, sure TS is extremely usable, async is extremely easy because it’s not a real thread, etc etc. But has plenty of quirks due to being tacked on top of JavaScript. (For example, being forced to import typescript from “.js” extension and not “.ts” with certain normal compiler settings…)

reply
Typescript is single threaded and 2-10x slower and does not compile into a binary.
reply
Funny enough, the Typescript 7 compiler is no longer single threaded because it’s (ironically) now written in Go, not Typescript.
reply