FeaturedIT topics

Go tutorial: Get started with Google Go

Why would you want to use the Go language? Basically, it’s a concise, simple, safe, and fast compiled language with wonderful concurrency features, and it easily handles large projects. It’s also free open source, even though it was originally developed at Google.

According to Rob Pike, one of the designers of the language, “the goals of the Go project were to eliminate the slowness and clumsiness of software development at Google, and thereby to make the process more productive and scalable. The language was designed by and for people who write—and read and debug and maintain—large software systems.”

In accordance with those goals, Go lacks many features of some other prominent languages—and that’s actually a strength. Go is not object-oriented, it doesn’t have header files or forward declarations, it doesn’t have a type hierarchy, it doesn’t have method or operator overloading, it doesn’t have generics, it doesn’t have a virtual machine for a runtime, it doesn’t have exceptions, and it doesn’t have assertions.

On the other hand, what Go has works quite well. It can compile big programs in a few seconds. It has low-overhead coroutines (called goroutines) that can communicate efficiently through channels. It has interfaces and interface composition. In addition, Go supports first-class functions, higher-order functions, user-defined function types, function literals, closures, and multiple return values—in other words, it supports a functional programming style in a strongly typed language.

Related Articles

Back to top button