What is Go programming language?

What is Go programming language?

According to the Go website, Go is a

"fast, statically typed, compiled language"

But what does this mean?

  • It means that Go is compiled down into machine level code that computers understand, so it does not need to be interpreted one line at the time. This is the reason why it is so fast compared to interpreted languages like python.
  • Statically typed because variable types are checked before runtime by the compiler, so type errors can be picked up earlier.
  • It is also a strongly typed language meaning our variable types can not be changed once they have been declared so if you make a variable that is a string it must always be a string in the future, it can not be changed into a number.

Go is also a general purpose language, it can be used for web apps, REST APIs, cloud services.

Go also has a built-in testing support, means there is no need to add extra dependencies to write your tests.

Go is an object oriented language it's in own way. The language does not use classes and constructors in Go, but it uses features like structs and interfaces that mirror that kind of functionality.

Now what makes Go different from other languages ?

If we look at famous scalable languages like Java and C#, at the end of the day they are becoming very very similar and get ideas from each other. Go is different. Go does not use the same principles as C# or Java or any languages those use inheritance. Go uses composition.

The objects you write in Go are made up of other smaller objects with particular behaviors, in other words, larger objects with a wider functionality are embedded with smaller objects with specific behaviors.

Other benefits of Go compared to the two above mentioned languages is the garbage collector solution of Go and the fact that the language was designed when there were more than one core in the CPUs. There is also one thing that should be mentioned when you talk about Go and this is goroutines.

All of this topics will be covered in the following posts, keep watching the posts 😁

Did you find this article valuable?

Support Renátó Bogár by becoming a sponsor. Any amount is appreciated!