Go: Why you should learn Go now
Go is a language made at Google that has been gaining popularity recently. This article will give a brief overview of what makes it one of the most developing programming languages now and why you should learn Go now.
Before we move on to the technical details, have a look at the graph below. This is from a survey done by StackOverflow across tens of thousands of developers to know median salary of developers based on experience for many programming languages. And among the popular languages, Go developers earn the highest! Only Clojure and F# are higher.
Now to the technical part. What all things do we want in our app/software/website?
- How easy is it to pick up?
- Is it fast?
- Is it easy to write robust code or is it easy to make errors?
- Does it scale well enough? Does it support concurrency?
- How is the community of the language?
- Are there enough libraries?
How easy is it to pick up?
The syntax of Go is fairly clean, C-style and approachable for beginners. For example it took about a day for the new interns in my company to pick up fairly enough to start understanding “real” code base. The Go Tour gives a good enough starting point for any beginner to get up and running within a solid day of effort.
Is it fast?
Go is decisively faster than Python. At the same time has simple syntax and structure. Since it is compiled language, it gives feedback about the program faster and thereby saving time. Being typed, it is easier to maintain and understand.
Is it easy to write robust code or is it easy to make errors?
Go makes you follow some strict rules which mean your code is more robust. For example, Go doesn’t let you define a new variable if it is never used anywhere. Being statically typed, it makes you think more clearly about the program and the resultant code is neater.
Does it scale well enough? Does it support concurrency?
Go is made for highly scalable and concurrent systems. Concurrency has become very important in today’s world considering the hardwares are reaching their theoretical limit. The concurrency is built in with the help of goroutines, channels and garbage collection. Here is an article showing goroutine and channels in action with example code.
How is the community of the language?
Go has an excellent, ever-increasing community behind it. To give an idea, Kubernetes, the most popular and largest open source container orchestration system is written in Go with thousands of contributors. If you are new to Go, you can join the Gophers Slack channel, and keep up to date in StackOverflow. Besides there are Facebook groups where you can join the discussions.
Are there enough libraries?
Although there are not as many libraries as Python, Go still has a significant amount of libraries to get many jobs done. Here is a HUGE list of libraries/projects in Go. These can get you up and running in realising many of your ideas such as Audio, Authentication, Games, Database, Email, GUI, NLP, Security and many more!
Other points for why learn Go now
Look at the companies that have adopted Go now:
- Apple
- Netflix
- Uber
- Docker
Go is fast and efficient for computers (like C, C++) and also fast and fun for developers(like Python). It has been steadily growing in the past 5 years and projected to grow even more in coming future. So what are you waiting for? Start learning Go now!
If you want to learn more about Go in the context of Microservices, then check out this FREE course.