Golang (Go) took the entire programming world by surprise. Go has emerged from Google where Robert Griesemer and Rob Pike were sharing an office in 2007. Rob Pike was been thinking how inappropriate C++ was, because it lacked support for the new multi-core machines, and was getting frustrated with 45 minutes compile-time pauses in C++. A year later the duo met in Sydney, video conferenced Ken Thompson from California and came up with the formal specification of the language. Later, Ian Taylor (also from Google) saw the specification and created a compiler. That is when things started to get materialized…
Features of Golang
The GoLang, is a robust system level language used for large scale network servers and big distributed systems. The language is designed specifically to give developers fine control over processor cores and memory. Go allows define memory layout for objects and user real pointers to point to subset of those objects. Usually garbage-collected languages are poorly suited for low latency but tuned for throughput. In Go, garbage collector designed and optimized for latency. The Go code compiles to the native platform single executable while resolving dependencies at compile time. To optimize compilation, unused libraries and variables are flagged as compile time errors. Generics are omitted to remove unnecessary complexities. Out-of-the-box toolchain provides excellent tooling including profiling and inbuilt testing framework.
In contrast, Java was a great experiment but started to fade away on me, especially when it comes to the JDK/JRE versions and dependency management, speed of execution, garbage collection, etc. To me the JVM concept is great, but constant worries about compatibility of JVM versions, and making sure that proper JVMs do exist across all the servers in all regions is not appealing. For the same reason Python fails short because it needs its own version of the interpreter. Interestingly enough Kubernetes team felt the same about Python, and decided to implement Kubernetes in Golang. Uber also opted out for Golang and rewrote their software in Go, while increasing the performance and minimizing the footprint of the system. The list continues: Docker, InfluxDB, CockroachDB, etc.
How to measure success
While undoubtedly Golang shines as a system-level programing language, the original architects of the language highlighted an interesting point – they believe that Golang will prove to be a success only when colleges start to offer Computer Science courses in Golang. I truly believe that the Golang is an incredible language, and will excite me for another decade or so.
Content that you’ll enjoy
This episode dives deep into the history and details of how’s and why’s of Go.