Why more and more businesses are starting to use Google Go, an open-source programming language, as an alternative to Java and Python? Not surprising. With its promise of agility, simplicity, and speed, Golang seems to have become one of the most powerful rivals to much older and common languages.
What is Go?
Google’s Go language was created 10 years ago as an experimental project. In 2009, two years later, it was introduced to the public. Short time after, the C-based programming language started gaining enormous popularity among web app development companies. The language founders claim to be driven by the idea of creating a “fast, productive and, most importantly, fun” programming language.
Go is a free, open-source general-purpose programming language created to be strongly typed and garbage-collected. Go programs are built from packages whose features allow effective dependencies management. The platform is growing in prominence, being perfected and acquiring new, extended features. Golang was designed to be a language that encourages good software engineering practices:
‘Go combines the development speed of working in a dynamic language like Python with the performance and safety of a compiled language like C or C+. Typical builds feel instantaneous; even large binaries compile in just a few seconds. And the compiled code runs close to the speed of C,’ Google said when Go was firstly launched.
However, Go is not a free-form programming language, as it specifies a lot of formatting details, such as the way spaces and indentation are to be used. The grammar is compact and regular, which allows for smooth analysis by automatic tools, such as integrated development environments.
What is Go good for?
Go is a great programming language that is widely applicable. It fits all-sized software projects with any level of complexity. It is simple, features minimalistic language, and maintainable code.
- Go is really good for writing networking apps and Web servers. The strength is in its well-written and powerful standard library.
- Go is very good for stand-alone command-line applications or scripts. The successive behavior across platforms allows putting out simple command-line applications that can run almost on any platform.
- Go is a great choice for concurrency. Its concurrency model takes from communicating sequential processes.
Networking apps are basically built on concurrency, and Golang’s native features (e.g. goroutines and channels) are perfectly fitted for this job. This makes Go programming language well-suited for minimal frameworks for Web app development, APIs, Web servers, etc. Golang developers prefer this language because most of the items (like goroutines) can be easily used and are available in its standard library.
There is also an issue of latency with garbage collection. Google’s language is claimed to be completely garbage-collected and provides fundamental support for concurrent execution and communication. This is highly important, considering the fact that some of the above mentioned fundamental concepts are not well supported by the majority of popular programming languages.
There are situations, though, when Go is not that good:
- Go is somehow applicable for writing system code. Although it may be not the best option for writing system code, Go allows for the integration of C code, which goes quite well.
- You’d better not use it for desktop or GUI-based application development. Building rich GUIs for Go apps is still not that well-managed.
- Although Golang is able to talk to native system functions, this language is not suited well for creating low-level system components, e.g. device drivers or the embedded system design.
Google’s Go wider adoption
A great number of major organizations, such as BBC Worldwide and The New York Times, are now using Go programming language for their internal purposes. Alongside large web-companies like Dropbox, Facebook, SoundCloud, and, of course, Google, you can find numerous smaller companies using Golang in their operations.
According to the Tiobe Index research that measures the popularity of languages amongst developers, Google’s Go has been nominated for the programming language of the year. From the 55th position in July 2016 Go moved up to the Top 10 in 2017. For now it is placed 20th in the Tiobe list.
Rather than recognizing the most popular programing language, Tiobe Index gave the award to the one that has seen the hottest growth in popularity, with many wanting to learn it. The ratings are based on the major searches on Google, Yahoo, Wikipedia, Bing, Amazon, YouTube, and Baidu. According to the research, Golang has been the greatest mover over the last year with hardly any competition.
Case study: How fuboTV has built a XXI Century Video Streaming Service using Go
…or how a small U.S. company has turned into a multi-million dollar service
In 2014, initially a small U.S.-based company fuboTV started its cooperation with Vakoms, a web app development company (Ukraine). With an ambitious idea of becoming a nationwide football streaming service, fuboTV aimed to provide access to worldwide football leagues and matches through apps for smart TVs, tablets, mobile devices, and desktop computers.
In 2014, initially a small U.S.-based company fuboTV started its cooperation with Vakoms, a web app development company(Ukraine). With an ambitious idea of becoming a nationwide football streaming service, fuboTV aimed to provide access to worldwide football leagues and matches through apps for smart TVs, tablets, mobile devices, and desktop computers.
‘Each microservice solves its own task, e.g. listing, searching, filtration, providing information about a channel, playing video, etc. Thanks to a new structure based on Golang programming language by Google, the rewritten back-end increased safety, development, and data processing speed.’ – Vitaliy Kudryk, web developer Go and Node.js engineer at Vakoms, Go engineer at fuboTV, web developer at Vakoms.
Initially, having developed the back end with Node.js, the company then decided to upgrade it, splitting it into separate microservices, coded on Go.
‘Most of all, I like Go’s simplicity and fast development pace. You can develop an app in a short term, and this app will be extremely fast in work.’ – Vitaliy Kudryk, Go engineer at fuboTV, web developer at Vakoms.
Golang’s Benefits and Drawbacks
Computers have become enormously quicker over the last decade; however, no major systems language has emerged in the tech world over that time. The Golang community explains the main drawbacks of some popular languages of these days.
What Google believes is that all of these drawbacks are worth trying to be cured again with a new, concurrent, promptly compilated and garbage-collected language.
Web app development with Go has a lot of Benefits:
- You can compile a huge program in a couple of seconds on a single computer
- Software construction model provides easy dependency analysis
- The type system has no hierarchy, which fastens the workflow
- Go provides basic support for concurrent execution and communication
- The language is completely garbage-collected
- The system software construction is available on multicore machines?
‘There is a compiler for many various systems, which means Go app can be used not only via mobile devices and laptops with OS installed, but also through smaller devices like coffee machines (Internet of Things).’ – Vitaliy Kudryk, Go and Node.js engineer at Vakoms.
On the other hand, there are still Drawbacks worth mentioning:
- Go still has a very young ecosystem
- There aren’t many libraries for Go yet
- It is hard to handle errors
- A lot of Go’s tools are quite limited when used
- Golang still has low-level features (e.g. pointer-arithmetic)
- It is simple to the point of being superficial
“The main drawbacks can be found in the actual realization of the language. Some things make routine tasks more complicated. Eventually, you get used to it, but anyway it adds “boilerplate” to the code.” – Vitaliy Kudryk, Go and Node.js engineer at Vakoms.
Go is a new language that doesn’t borrow from existing programming languages like C# and Java. Most of Golang development companies, when looking a bit deeper into its design and type system, admit Go’s simple and minimalistic approach. Although it comes with very limited features, it does not hurt your code reusability and general productivity.