Category: Go (Golang)
Go (Golang) is a new and growing language from Google. It was developed as a language for creating high-performance programs running on distributed systems and multi-core processors.
We publish articles about intricacies of practical use of the Go language in terms of large commercial projects.
Distinctive features
Go has common features with C, C ++ and C #. It provides full support for work with pointers, like C / C ++. At the same time, arithmetic operations with pointers that can be sometimes leading to errors when using C / C ++ are not implemented. A so-called Go-routine and channels are something like a business card of this language.
Go-routines and channels
Go routine is a function that is called asynchronously (in another thread) and is executed concurrently with other functions. Channels are used for data exchange between Go-routines. Channels can also be used to synchronize Go-Routines with each other and with the procedure that started them. A select operator, (an analog of switch in C and C ++ programming languages) is used for work with channels. It is possible to create channels with buffering.