Why should you learn Go

Why should you learn Go
Image source

Go is a relatively young but popular programming language. By survey data Stack Overflow, it was Golang that got the third place in the ranking of programming languages ​​that developers would like to master. In this article, we will try to understand the reasons for the popularity of Go, as well as see where this language is used and why it is worth learning at all.

A bit of history

The Go programming language was created by Google. Actually, its full name Golang is derived from "Google language". Despite the fact that in the announcement the language was called young, this year it is already ten years old.

Go's goal was to develop a simple and efficient programming language that could be used to create quality software. Rob Pike, co-creator of Go, stated that Go was designed for the company's programmers who are relatively recent graduates and know Java, C, C++, or Python. Go for them is a language that you can quickly understand and quickly get used to.

Initially, it was a tool within Google, but over time it left the bowels of the corporation and became public.

Language Benefits

Golang has a large number of advantages, both well-known and not so well-known.

Simplicity. Actually, this was the main goal of creating the language, and it was achieved. Go has a fairly simple syntax (with certain assumptions) that applications can be developed faster than in some other languages. And there are two interesting points here.

Firstly, Golang can be quickly learned by a complete novice in programming - someone who does not know any language at all and is just about to become a developer. One can say about Go that it is almost as simple (relatively, of course) as PHP or even Pascal, but as powerful as C++.

Secondly, Go can be mastered by an “established programmer”, someone who already knows one or more languages. Most often, developers learn Go after they have mastered Python or PHP. Further, some programmers successfully use a pair of Python/Go or PHP/Go.

A large number of libraries. If you're missing a feature in Go, you can use one of the many libraries available to do the job you need. Go has another advantage - you can easily interact with C libraries. There is even an opinion that Go libraries are wrappers for C libraries.

Code cleanliness. The Go compiler allows you to keep your code "clean". For example, unused variables are considered a compilation error. Go solves most formatting problems. This is done, for example, with the gofmt program when saving or compiling. Formatting is corrected automatically. You can learn more about all this in the tutorial Effective.

Static typing. Another advantage of Go, which reduces the chance of a developer making a mistake. Yes, for the first couple of days, a programmer accustomed to dynamic typing gets annoyed at having to declare a type for every variable and function, as well as for everything else. But then it becomes clear that there are solid pluses.

GoDoc. A utility that greatly simplifies code documentation. A big plus of GoDoc is that it does not use additional languages ​​like JavaDoc, PHPDoc or JSDoc. The utility uses the maximum amount of information that it extracts from the documented code.

Code maintenance. It is easy to maintain thanks to its simple and concise syntax. All this is the legacy of Google. Since the corporation has a huge amount of code for various software products, as well as tens of thousands of developers who sort it all out, a maintenance problem appears. The code should be understandable to everyone who works on it, well-documented and concise. All this is possible with Go.

At the same time, there are no classes in Golang (there are structures, struct), there is no inheritance support, which greatly simplifies code changes. Plus, there are no exceptions, annotations, etc.

What can be written in Go

Almost everything, with the exception of some points (for example, developments related to machine learning - Python with low-level optimizations in C / C ++ and CUDA is more suitable here).

Everything else can be written, especially for web services. In addition, Go is worth developing applications for both the end user and the development of daemons, UI, it is suitable for cross-platform applications and services.

Demand for Golang

Why should you learn Go
Over time, the language becomes more and more in demand. In addition to those companies that are present in the picture above, Mail.ru Group, Avito, Ozon, Lamoda, BBC, Canonical and others work with Golang.

“We decided to scale the business, it is important for us to build a fundamentally new technological platform that will ensure the rapid development of the product. We rely on Go because of its speed and reliability, and most importantly, the audience of programmers who use it, ”Ozon representatives said in 2018, after the company decided to switch to Golang.

Well, what about income? The salary of a Go-developer last year averaged 60-140 thousand rubles per According to "My Circle". Compared to 2017, this figure increased by 8,3%. Growth is likely to continue in 2019 as so many companies need Golang developers.

What's next?

Golang development will definitely not stop. The need for good specialists who know this language will only increase, so it will not be difficult for a specialist (beginner or pro) to find a job. In principle, this statement is still relevant now, since there is a constant shortage of developers in the IT market.

Go is good for both novice programmers and pros who already know one or more programming languages. Almost any programmer can learn it or relearn it.

The article was prepared jointly with the teacher Golang course in GeekBrains by Sergey Kruchinin, for which many thanks to him!

Source: habr.com

Add a comment