I have been using Go for a while now and it’s, to say the least, my favorite programming language of all time. There are many reasons that I would recommend Go. But today I am going to look at one idea.

Simplicity.

Go excels at being simple to understand. Even a non Go programmer will with easy understand a program written in Go. When I got started I learned enough Go in a weekend to write a production-ready code. The whole language spec can be found in this one-page document.

Here are a few examples of simplicity in Golang.

Golang is garbage-collected and yet there is no interface for the programmer to interact with the garbage collector. There is no need.

interfaces provide a very natural way to think about your programs. Here is an example using the net/http package func HelloWorld(w http.ResponseWriter , r *http.Request){ fmt.Fprintln(w, “Hello World”)} not we use fmt.Fprintln(w, “Hello world”) .We use Fprintf to write an HTTP response, notice the use of was the first parameter to Fprintln , since Fprintln expects an io.Writer interface we can use any type that adheres to that interface example fmt.Fprintln(os.Stdout, “Hello”) this prints to the console.

Simply put for loops and goto statements are the only way to loop.

Simple to use and reason about concurrency model. For go channels just use the keyword go.

Self-contained binaries.

Just go get … to do package management.

etc

I think what makes Golang simple is lack of many features. Features can be a great thing. But where one language provides all the feature then one spends a lot of time trying the choose the best feature to solve a problem. When the code is shared by a team then the team members also have to spend time thinking why those specific features were used. Fewer features mean readability of your code.

Share your thoughts.