Skip to main content

Why Golang

Why Go Lang

 Why I have started learning Golang :

I am working on a project for a company I work, which is based on webservice and will provide API service for developer and a interface where non developer can work with our product. and they will be charged on the basis of there usage. this project will be running on lots of microservices . For that micro service we will be needing a language that is really good at webservices(web services are designed to communicate with other programs) and easy to use concurrence(concurrency is when multiple sequences of operations are run in overlapping periods of time). Go is perfect for this type of work. on this blog I will be explaining about why I choose Go Lang for the task I am doing and what will come next.

Context:

Go was created at google for them to solve certain amount of problem they were having with the language they were already using. At the time they were using only three language
  1. C++
  2. Python 
  3. Java
they all are really good languages but they have there flows as well.
 
if we look at C++, the advantages and disadvantages are :
Advantages disadvantages
high Performance Slow Compilation Time
Type safety
Complex Syntax

Type safety will make the program more maintainable.  

if we look at Python, the advantages and disadvantages are :
Advantages disadvantages
Easy to use No type safety

Relatively slow


if we look at Java, the advantages and disadvantages are :
Advantages disadvantages
Rapid compilation time Complicated ecosystem
Type Safety



While the advantages of Go is :
  1. fast compilation
  2. compiled language
  3. strongly typed 
  4. concurrency by default
  5. Simple ( not easy )
  6. garbage collected language ( freeing the storage while program is no longer using )
go was made to solve all the problem that engineers on google were having on Java, python and C++. And go is really good at network base application And:
  • web services
  • web application

Basically Go is perfect for Backend programming and building webservices and API services. although one can use go for 
  • task automation
  • GUI
  • machine learning 
but web services and web application are best for go because of its very strong network api that provided in standard library and built in concurrency.

I will be updating all the stuff and mistake I do on the way of learning this language so that other people can learn from my mistake. and will explain what I understood on next blog.


Previous Blog Next Blog

Hello World With Golang

Comments

Popular posts from this blog

Creating a project with Golang

Overview    You can run a go file with out making a project. But the standard way to use go is to create a project or you can call it a space where you will be putting your go code, on the other hand it is a work space, but in Go Lang we call it module. In Go Lang modules are the official way of organize go code. in this blog I am going to explain the way you create a model and first hello world with that project. Explanation To Module you need to run the command bellow go mod init <module name>  If you can see I have named my module github.com/TahimFaisal/golang. the name of the module is called module initializer. this is the standard way of initialization. And for the go get command it will it will know where to go and get the mod if it cannot find the mod locally.  Okay, soon after you ran the command you will get a file named go.mod in your working directory  it will be having module initializer and the version of go your using.  ...

Primitive data type of Golang

Overview In this blog I am going to talk about the date types and variables in go. and the topics bellow  Declaring and initializing variables   explicit initialization of variables   implicit initialization of variables complex data type list of data type Pointer pointer operator dereferencing operator address of operator Constant Iota and constant expression Declaring and initializing variables there are 2 ways you can declarer and initialize a variable they are explicit initialization variables  implicit initialization variables  Explicit initialization of variables  in this way you have to tell the compiler every thing you need to declare a variable. var i int i = 20 var j int = 3 fmt.Println(i,j) var f float32 = 32.233 fmt.Println(f)  in this way we are explicitly telling what will be the input type for that variable. Implicit initialization of variables  in this way of declaring a variable. we don't have ...

List of data types in Golang

  index Description 1 Type: int8 8-bit signed integer 2 Type:  int16 16-bit signed integer 3 Type:  int32 32-bit signed integer 4 Type:  int64 64-bit signed integer 5 Type:  uint8 8-bit unsigned integer 6 Type:  uint16 16-bit unsigned integer 7 Type:  uint32 32-bit unsigned integer 8 Type:  uint64 64-bit unsigned integer 9 Type:  int Both in and uint contain same size, either 32 or 64 bit. 10   Type:  uint Both in and uint contain same size, either 32 or 64 bit. 11 Type:  rune It is a synonym of int32 and also represent Unicode code points. 12 Type:  byte It is a synonym of int8 . 13 ...