Learning Go (programming language)

Jimmy (xiaoke) Shen
2 min readAug 18, 2020

Golang is a procedural and statically typed programming language having the syntax similar to C programming language. Sometimes it is termed as Go Programming Language. It provides a rich standard library, garbage collection, and dynamic-typing capability. It was developed in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson at Google but launched in 2009 as an open-source programming language and mainly used in Google’s production systems. Golang is one of the most trending programming languages among developers. -Geeksforgeeks

Websites

See[1][2]

Why this “Go language”?[1]

Because Go language is an effort to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. It also aims to be modern, with support for networked and multicore computing.

Hardware Limitations[1]

We have observed that in a decade, the hardware and processing configuration is changing at a very slow rate. In 2004, P4 was having the clock speed of 3.0 GHz and now in 2018, Macbook pro has the clock speed of Approx (2.3Ghz v 2.66Ghz). To speed up, the functionality we use more processors, but using more processor the cost also increases. And due to this we use limited processors and using limited processor we have a heavy prog. language whose threading takes more memory and slows down the performance of our system, Hence to overcome such problem Golang has been designed in such a way that instead of using threading it uses Goroutine, which is similar to threading but consumes very less memory.
Like threading consumes 1MB whereas Goroutine consumes 2KB of memory, hence at the same time, we can have millions of goroutine triggered.
So the above-discussed point makes golang a strong language that handles concurrency like C++ and Java.

Advantages and Disadvantages of Go Language[1]

Advantages:

  1. Flexible- It is concise, simple and easy to read.
  2. Concurrency- It allows multiple process running simultaneously and effectively.
  3. Quick Outcome- Its compilation time is very fast.
  4. Library- It provide a rich standard library.
  5. Garbage collection- It is a key feature of go. Go excels in giving a lot of control over memory allocation and has dramatically reduced latency in the most recent versions of the garbage collector.
  6. It validates for the interface and type embedding.

Disadvantages:

  1. It has no support for generics, even if there are many discussions about it.
  2. The packages distributed with this programming language is quite useful but Go is not so object-oriented in the conventional sense.
  3. There is absence of some libraries especially a UI tool kit.

Some popular Applications developed in Go Language

  • Docker: a set of tools for deploying linux containers
  • Openshift: a cloud computing platform as a service by Red Hat.
  • Kubernetes: The future of seamlessly automated deployment processes
  • Dropbox: migrated some of their critical components from Python to Go.
  • Netflix: for two part of their server architecture.
  • InfluxDB: is an open-source time series database developed by InfluxData.
  • Golang: The language itself was written in Go.

Reference

[1]https://www.geeksforgeeks.org/golang/

[2]https://golang.org/

--

--