“I think Node (.js) is not the best system to build a massive server web. I would use Go for that. And honestly, that’s the reason why I left Node. It was the realization that: oh, actually, this is not the best server-side system ever.” (HS, 2017) This quote is by Ryan Dahl the author of Node.js.
Well, this is basically my story too. I left Node.js as well, and now I use the Go Language (Golang, Go) as my backend technology of choice. Although Node.js will always have a warm place in my heart, if you are looking for the best backend technology that is out there, I fully recommend Golang. Let me tell you why.
Go is Perfect
The motivation behind the creation of Go was that currently, there are many programming languages available. Each has its own pros and cons. There are some languages that are efficient, but not simple, like C and C++. And, on the other hand, there are simpler languages that are less efficient, like JS and Python. But, a programming language should be perfect—both efficient and simple, right? Go is both, and a lot more. Let me elaborate a little further on why that is.Go Syntax is Simple and Clean
Go syntax is something between C and Python with advantages from both languages. It has a garbage collector that is very useful.- It does not have objects, but it supports structures (structs) and any type can have a method.
- It does not support inheritance, but does support compositions and interfaces.
- You can have a pointer to a variable, but at same time, you don’t have to worry about referring to its methods.
- It’s statically typed, but it’s non-strict because of the type inference.
- Its package-based code management reduces the number of code lines.
- And last but not least, Go has a simple concurrent model.
- Swapping between variables is simple:
- b, a = a, b
- It allows you to import a package directly from GitHub or any other source manager:
- By starting a Goroutine, it supports concurrent routing:
- Allows you to refer to a method of instance of some type, no matter if it’s a pointer or the actual instance:
- instance.method()