Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
January 7, 2021 07:19 am GMT

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.

  • Its 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 doesnt 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

  • Alt Text

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

  • Alt Text

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 mainimport "fmt"func main() {    fmt.Println("Hello World !")}
Enter fullscreen mode Exit fullscreen mode

OUTPUT

Hello World !

If you got to learn something new and useful show some love by giving this post a

If you have read so far, save this post and share it with your programming buddies

Resources

Do you something else about Go? Do share that with the community in the comment section


Original Link: https://dev.to/hardikchopra242/introduction-to-go-374o

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To