GoLang for beginners - Part 1

GoLang for beginners - Part 1

ยท

2 min read

  1. Introduction :

    Go is the language made at Google by Robert Griesemer, Rob Pike, and Ken Thompson in 2007, which was open-sourced in 2009. Go is statically typed which means variables are declared explicitly and determined at runtime.

    Why another programming language?

    Whenever we learn any programming language the first question obviously comes to mind why learn a different language when there are many others? So the answers may be the following:-

    • Infrastructure changed a lot.

    • Multicore processors were included everywhere.

    • Cloud infrastructure became common.

    • Big Network Computation Clusters became universal.

However, existing languages were not able to take full advantage of it. Here comes the use of the Go programming language with Multicore concurrency support. This support is on C++ and Java but they have complex code and are slow.

  • Go was designed to run on multiple cores and built to support concurrency(Dealing with lots of things at once).

  • Concurrency in Go is cheap and easy.

Use cases of GO

  • Writing applications that need to be very quick

  • An application that will run on modern, scaled, and distributed infrastructure with hundreds of thousands of servers typically on a cloud platform.

Go is used in server-side backend applications, these can be:

  1. Microservices

  2. Web-Applications

  3. Data-Base services It is interesting to know that many cloud clusters are already written in Go. Docker, Kubernetes, and Cockroach Db are written in Go.

Go characteristics

Simple and Readable - Has syntax of dynamically typed language like Python Efficiency and Safety - of lower-lever, statically-typed language like C++

Advantages

  1. The simple syntax which makes it easy to learn and write code.

  2. Fast in building time, startup, and running.

  3. Requires fewer resources.

  4. Easy to maintain.

Compiled Type Language- Go compiles into single binary code(machine code) which can be run on any system, unlike Python.

BASICALLY .... simplicity+speed= GO.......

ย