Maybe you have heard about Go. Maybe you haven’t. Depending on who shared their experiences with you the impression you got is either good or bad. I’ll give you the 6 main reasons I see that you should start writing code in Go right now.
1 – Go is a compiled language
It might not mean a lot to you – but most of the developers out there today have been writing code in nothing but dynamically typed scripting languages all their lives. This is all fine and dandy – but the metal that actually run the code, needs some machine language and it certainly need strong types. If you have been writing code in scripting languages or for running on VMs your entire career I urge you to try a real compiled language – it feels very good. No more carrying around an interpreter, virtual machine or heavy standard library. With Go you can compile a binary and run it – one file.
2 – Concurrency in Go is really easy
And I mean like SUPER easy. Go use goroutines for concurrency – it is dead simple – you put “go “ in front of you function call and boom – concurrent execution. Built in channel type makes it oh so very easy to communicate between concurrent parts of your code. Look it up for further details – it is so nice.
3 – Writing servers is easy
The Go standard library contain very powerful mechanisms for writing HTTP servers. If you know stuff like node.js and appreciate how easy it is to write a small server that does amazing stuff you will love Go. Even writing small mock servers is easy and convenient.
4 – The code is beautiful
Well – it really depends on what you personally prefer – but since I first saw some Go code I really liked the structure and simplicity the language offers. Things like multiple return values makes a nice icing on the cake – but one of the very best features is gofmt. It will format your code THE standard way – no more team arguing where to place the brackets and stuff like that. Just beauty in the code.
5 – Fantastic standard library
Check it out yourself. And check out the “community” packages too. It is simply fantastic!
6 – Workspace structure
The standard workspace structure will work in you favour if you follow it. All the builtin tools like “go get”, “go build”, “go test” and “go install” will function so very nicely.
<iframe style="border: 1px solid #CCC; border-width: 1px 1px 0; margin-bottom: 5px; max-width: 100%;" src="http://www.slideshare.net/slideshow/embed_code/33694253" width="427" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen="allowfullscreen"> </iframe>