Click here to Skip to main content
Click here to Skip to main content

Tagged as

Go to top

6 Reasons You Should Program in Go

, 20 Apr 2014
Rate this:
Please Sign up or sign in to vote.
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

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>

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Michael Banzon

Denmark Denmark
No Biography provided

Comments and Discussions

 
QuestionAbout the uses of Go PinmemberMember 816573016-May-14 5:11 
QuestionThere is one thing I hate about it though PinmemberJeff Lindholm25-Apr-14 3:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140922.1 | Last Updated 21 Apr 2014
Article Copyright 2014 by Michael Banzon
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid