Go in 2 minutes

Go in 2 minutes:

 Golang or Go was developed at Google as an open-source programming language and is one of the most trending programming languages among developers. Used by Google, Netflix, Twitter, and millions of users let’s take a look at it.

What is Go?

Golang is a procedural and statically typed programming language. The goal was to create a language, loosely based on the syntax of C. It can be used in place of Python, Node.js, or PHP in the backend.

Go is not a free-form language, its conventions specify many formatting details, including how indentation and spaces are to be used. The language requires that none of its declared variables or imported libraries are unused, and all return statements are compulsory.

Why Go?

  • Go is a general-purpose language so it can be used for almost anything.
  • Mostly for scalable and efficient (web) services.
  • Another area is cloud applications. Google has high hopes for it becoming the defacto cloud language

Some features of Go

  • One defining feature of Go is concurrency, which means that multiple processes can be executed at the same time, which makes Go an efficient language.

  • It’s compilation time is very fast.

  • It supports the patterns which adapt to the surrounding environment similar to dynamic languages.

  • It supports the interfaces and embedded types.

  • It doesn’t require any external dependencies for the production of the statically linked native binaries.

Statistics

Here are some stats from Stack Overflow 2020 Developer Survey.

From last year, Go has jumped from 10th position to 5th position, making it in the list of Top 5 most loved programming language

Go is also one of the Top 3 languages associated with the highest salaries globally.

Bonus 🔥

So up to this point, we have seen and understand what is Go and why to use go, now let’s see how to write Go. It is a beginner’s guide so we will just write code for everyone’s favorite, Hello World!

INPUT

package main

import "fmt"

func main() {
    fmt.Println("Hello World !")
}

from Tumblr https://generouspiratequeen.tumblr.com/post/639741422033059840

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s