Published: Wednesday, Jan 19, 2022 Last modified: Wednesday, Mar 29, 2023
Less bugs wanted
Given the choice:
- TypeScript by Microsoft
- The Go language (aka golang) by Google
What are the arguments for and against?
Pros of Typescript
Cons of Typescript
TypeScript is a scripting language for C# – https://twitter.com/coolaj86/status/1485166837163642883
- Tied to the Microsoft ecosystem
- Package dependencies are a mess, some have Typescript bindings, some don’t. Lots of blind spots.
- Lots of churn and difficult choices need to made wrt tooling
Pros of Golang
- Simple, well-designed end to end ecosystem supported by Google
- Better error handling
- Faster performance, which can be further enhanced to concurrent execution (not limited to being single threaded)
- Far better package design
- Easier to maintain in the long run
- Produces static binaries which are easier to deploy
- Go can be learned in a weekend
Cons of Golang
The biggest con of Go isn’t that people don’t know it - it’s that they refuse to learn it. They’ll die with a cold, hard grip on their overly-complicated polymorphic inheritance systems and useless utility libraries. – https://twitter.com/coolaj86/status/1485167527814590465
- Assumption that the JS isn’t front end code. Of course Go isn’t a browser language and hence JS is far better suited for dynamic frontends, e.g. using https://vuejs.org/
- Again if you have JS on the frontend, you might argue it’s easier to hire or form a cross-functional team that can switch between front and back end.