First Steps with Golang

First Steps with Golang

A wise man once said;

“The first step into learning a new concept is the start of a wonderful journey and It’s up to you to decide how far to go”.

In this article, I will define Golang, what it is used for, some of its features and how to set up a development environment for Go.

Introduction

Go is often referred to as a simple programming language, a language that can be learned in a few hours if you are familiar with any basic programming language. It was designed to feel familiar and to stay as simple as possible. The grammar is compact and simple to parse, allowing for easy analysis by automatic tools such as integrated development environments.

How did Go come into existence?

Go or Golang is an open-source programming language designed by three Google developers; Robert Griesemer, Rob Pike, and Ken Thompson. You might want to ask what the motivation was 🤔…

Developers at Google had to maintain millions of lines of code that were constantly being updated. The time needed to convert their code into working programs was taking a substantial amount of time, from minutes to even hours! This problem was also compounded by the fact that each developer needed to undergo the same process. As a solution to these problems, the designers of Go aimed at eliminating the slowness and clumsiness of software development at Google, and to make the process more productive and scalable.

In simple words, the purpose of Go was to make it faster and easier for developers to develop. It has modern features like garbage collection and it also takes advantage of powerful multi-core computer capabilities with built-in support. The beauty of Go’s features and speed has captured the interest of many developers including; application developers and infrastructure teams. As its adoption grows, there will likely be an even larger expansion of its utilization in apps, web development, command-line interfaces, and many other implementations.

Some advantages of Golang over other languages

  • Python – Easy to use but slow
  • Java – Increasing complex type system
  • C/C++ - Complex type system and slow compile time

Other features include;

  • Strong and statically typed
  • Excellent community
  • Simplicity
  • Fast compile time
  • Built-in concurrency
  • Compile to standalone binaries

To run Go programs on your computer, you need to set up a development environment. Find a guide here to get you started for Windows and Mac, for Linux systems here.

References

talks.golang.org/2012/splash.article

golang.org/doc