"Go" - Simple yet Powerful

"Go" - Simple yet Powerful

Overview of a cool programming language of the new age

From the name of it, we can guess that it was developed by Google in 2007. Google was not happy with the existing programming languages and wanted to create one on its own. They created "Go" to increase their control over the code, improve the programming productivity, and increase the readability. They were inspired by the run-time efficiency of 'c', code reusability and readability of 'python' and high performance and networking capabilities of 'Java'.

What is Go?

Go is a very simplistic and fast open-source programming language developed by Robert Griesemer, Rob Pike, and Ken Thompson in google in 2007. As it is inspired by c, most of the syntax is identical but differs from it as Go has a garbage value collector, memory safety etc.

Factors that make 'Go' advantageous to others:

1.Simple - The major key reason for Go to be popular is that it has a very easy syntax, there is no need for semicolons, curly braces for control structures and parentheses for function. This helps the developers to read the code easily and find errors.

2.Fast - The support for concurrency makes Go 20 to 30 times faster than python. And because of its Garbage collector and use of pointer over references, it's very fast.

3.Portability and cross-platform usage - Go can be compiled for any architecture and operating system.

Many companies are using Go for a variety of products and features. Google uses it in most areas because they are the ones who developed it. Netflix uses it to process data efficiently in servers. Uber uses Go for the Geofence service. Dropbox is one of the major companies which uses Go to scale its systems efficiently.

Basic Program:

package main
import "fmt"
func main()
{
   // prints Welcome to the Quasar community
   fmt.println("Welcome to the Quasar community")
}

Output:

Welcome to the Quasar community

Working of the Programming:

1.The Package main contains the overall code. It is the starting point of the program.

2.The Import "fmt", the import command tells the compiler to include the files in the corresponding package.

3.The main function is the beginning of the program.

4.The fmt.Println() is a library function to print the given output on the screen.

Comments:

single line comment:

Syntax

/single line comment

Multi- line comment:

Syntax

/* single line comment */

Some Advantages and Disadvantages of Go language:

Advantages:

  • It is simple, compact, and easy to read.
  • Multiple processes can be run simultaneously and effectively.
  • The output is obtained very fast
  • The key feature of Go is the Garbage Collector, which dramatically reduces latency and gives a lot of control over memory allocation.

Disadvantages

  • It is not that so object-oriented in the conventional sense.
  • Not all libraries are available or present in this.