Go
From APIDesign
Go is a programming language developed by Google. When it was introduced in 2009, it was promoted as:
- statically typed
- compiled language in the tradition of C
- with memory safety
- and garbage collection
- and structural typing
- and CSP-style concurrency
After the usual initial hype it kept some of its coolness. Primarily because of the rise of docker (as most of the docker ecosystem is written in Go).
Contents |
Forget Go!
The above is probably all you need to know about Go. Because the goal of this post isn't to promote Go, the post is written to explain that you don't need Go at all. That there are better, faster, more approachable, more toolable alternative language. If you are a happy Go user, stick to it, but if you are considering to use Go for development of a new system, then the main take away is: **Forget Go!**, there are better options.
Let's start by enumerating what are the problems with the Go language.
Slow
Go is slow. The same algorithm written in Go runs at least twice as slow than the same algorithm written in Java or C. I have created a project to measure Turing Speed of various programming languages on a variant of Ancient and well known Sieve of Eratosthenes algorithm.
Hard for Coding
Support in IDEs is really bad. TBD. Not an industry standard.
Proprietary
TBD: whole stack is written from scratch and it shows.
Go, Java go!
This is not to say everything in bad in Go. If you are working in an ecosystem that is build with Go (e.g. you are coding against Docker APIs or your are a Google employee), it may still be beneficial to use Go. But otherwise, let's consider Java!
Java!? That slow, interpreted language which eats enormous amount of memory to execute its virtual machine and feels like an operating system on its own? That Java which every real OS level hacker hates? Yes, that one. Well, not exactly that Java, but rather a SubstrateVM. Let's enumerate what Java is:
- statically typed
- compiled language in the tradition of C
- with memory safety
- and garbage collection
- and structural typing
- with multi-threading concepts built into the language since day one
Does that sound familiar? Yes, the language has the same benefits as attributed to Go. Moreover (in combination with SubstrateVM) one also gets similar runtime behavior. SubstrateVM gives Java (and any other JVM language) following:
- instant startup
- no interpretter/dynamic compilation overhead
- low memory consumption
If you have a pre-occupation against Java forget them. We'll use the best of Java (or any other JVM language like Kotlin) and combine them with SubstrateVM to form a system which is clearly way better than anything Go can provide.