There are a few things that make Go a good computer language to learn and particularity a good first language to learn.
Go is a very modern language it’s only 5 years old. Compare this to Python, which you might have seen at school, it is actually 24 years old! By contrast Java and Ruby are 20 years old, C++ is 32 years old and C is 43 years old! Even Scratch is almost 10.
But the computers we have now a vastly more powerful and different from those we had 25 years ago. The mobile phone you have in your pocket is more powerful than a computer was 25 years ago! The problems we are tying to solve with computers now are also much larger and harder then the ones we dealt with 25 years ago.
It does not make much sense to try to solve the problems we have today, using programming languages that we designed 25 or more years ago. Today’s computers and problems are different. Go was designed to solve the problems we have now on the computers we have now.
Go is a small language. There are only 25 keywords in the language. Each of these words has a special meaning in the Go language. These words cannot be used for anything else. But it means you only have 25 words to remember.
Go has a minimal feature set. The inventors of Go threw away more ideas from other computer languages than they kept. This keeps Go focused on making things easy for you to use. You can think about the most important thing - the problem you are trying to solve.
Go is a very easy to write and read. Every line in a Go program reads logically from left to right. The rules for this are very simple and easy to learn.
Go programs have the same style. Small, and sometimes large, sections of programs are written in a similar way, or pattern. Once you spot the patterns you know immediately what the code is doing.
Go even has a tool that will reformat your code to a standard style, so it is easier for you and everyone else to read.
You are going to make lots of mistakes when you start learning Go. So if your program won’t run at all, Go will tell you where the problem is and tell you why.
If your program runs but doesn’t work as you expect then you have a mistake in your program: a bug. You need to fix or debug this. Go makes this easy because every line has a simple logical structure. All you need to solve the bug is a pen, some paper and a bit of logical thinking.
Testing that your program works as expected is very important. Go can help you do this too. You just need to write a test program. Go has a test tool that will run your test program and the program you want to test. Go then compares the results of both programs and tells you if they match or not.
Go is helpful. Go comes with a lot of information about the programming language
itself, and the programs that are used to create the programs. So if you want to
know what the
fmt.Println line really does in the “Hello, World!” program you
can look it up easily.
You can also write documentation for your own programs, and the Go makes this easy and GoDoc tool will format it for you in the same style as the standard Go documentation.
In addition to this, there are huge amount of information on the Go website including the Go Wiki, the FAQ and the mailing list, slides and even videos. If you want to look at how Go itself was written you can do that do to.
Across the Internet there are even more tutorials, blogs, programming tips, sides and videos. There are is also an enormous amount of other peoples Go code look at, read, understand, download and change.
Most of what is available on the Internet assumes you can program in at least one textual programming language already and preferably Go. So you might not be able to understand too much to begin with. But as you learn how to program in Go you will be able to understand much more.
Go is a statically typed language. This means that in a Go program an entire class of mistakes in the program, bugs, can be detected before the program is even run. It means you have to think a little bit more, but you never have to debug these difficult errors. It also makes your programs much easier to understand.
Go is a compiled language. This means go is fast, very fast. Go’s compiler takes your program and turns it into something the computer can understand. Even for the largest of Go programs, the compiler can do this in under 2 seconds. But once your program is compiled, you don’t need Go any more to run it. This means you can give your compiled program to someone else they can run it too, even if they don’t have Go installed on their computer, or your source code.
Go is fun to learn. Given the above benefits over other languages, the process of learning Go is more rewarding for the student. We have found that people of all ages have enjoyed learning and eventually mastering, Go. And once mastered, not only can your skills translate to understanding other computer languages, but you will be able to better think constructively and logically to solve a host of real world problems.