⬆️ ⬇️

Why do you need to learn Go



Image source



Go is a relatively young but popular programming language. According to the Stack Overflow survey , it was Golang that received 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, and also see where this language is used and why it should be studied at all.



A bit of history



The programming language Go was created by Google. Actually, its full name Golang is a derivative of “Google language”. Despite the fact that in the announcement the language was named young, this year it marks ten years already.



The goal that the Go creators faced was to develop a simple and effective programming language that could be used to create high-quality software. Rob Pike, one of the creators of Go, said that Go was designed for company programmers who recently graduated from school and know Java, C, C ++ or Python. Go for them - a language in which you can quickly understand and quickly get used to.



Initially, it was a tool inside Google, but over time it came out of the corporation’s depths and became public.



Language benefits



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



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



First, Golang can quickly learn a complete beginner in programming - one who does not know any language at all and is only going to become a developer. About Go, we can say that it is almost as simple (relatively, of course) as PHP or even Pascal, but as powerful as C ++.



Secondly, Go can master the already “formed programmer”, the one who already knows one or several 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 lack a Go feature, you can use one of the many libraries and complete the required task. Go has another advantage - you can easily interact with C libraries. There is even an opinion that Go-libraries are wrappers for C-libraries.



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



Static typing. Another advantage of Go, which reduces the likelihood of making a mistake by the developer. Yes, for the first couple of days, a programmer who is used to dynamic typing is annoyed to declare a type for each variable and function, as well as for everything else. But then it becomes clear that there are solid advantages.



GoDoc . A utility that greatly simplifies documenting code. The great advantage 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 code being documented.



Code maintenance. It is easy to maintain thanks to a simple and concise syntax. All this is a 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, there is a maintenance problem. The code should be clear to all who work 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 support for inheritance, which greatly simplifies changing the code. Plus there are no exceptions, annotations, etc.



What can I write on Go



Practically everything, except for some moments (for example, developments related to machine learning - here Python with low-level optimizations on C / C ++ and CUDA is more suitable here).



Everything else you can write, especially this is true for web-services. In addition, Go is worth developing applications for both the end user and the development of demons, UI, it is suitable for cross-platform applications and services.



Golang demand





Over time, the language is becoming increasingly popular. 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 up the business, it is important for us to build a fundamentally new technology 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, ”said Ozon representatives in 2018, after the company decided to switch to Golang.



Well, what about the income the salary of the Go-developer last year averaged 60-140 thousand rubles according to the data of "My Circle". Compared with 2017, this figure increased by 8.3%. In 2019, most likely, the growth will continue, since Golang developers are needed by very many companies.



What's next?



Stop in the development of Golang just will not. The need for good specialists who know this language will only increase, so it will be easy to find a job for a specialist (novice or professional). In principle, this statement is relevant even now, as 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. Practically any programmer can learn it or retrain.



The article was prepared jointly with the teacher of the Golang course in GeekBrains Sergey Kruchinin, for which he thanks a lot!



')

Source: https://habr.com/ru/post/446914/



All Articles