Click here to Skip to main content
15,891,423 members
Articles / All Topics

6 Reasons You Should Program in Go

Rate me:
Please Sign up or sign in to vote.
4.00/5 (1 vote)
20 Apr 2014CPOL2 min read 7.5K   1   2
Listed here are 6 reasons you should program in Go

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 your 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 your favour if you follow it. All the builtin tools like “go get”, “go build”, “go test” and “go install” will function so very nicely.

License

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


Written By
Denmark Denmark
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionAbout the uses of Go Pin
Member 816573016-May-14 5:11
Member 816573016-May-14 5:11 
I've been wondering (and based on the last question) what is the uses for this new language, is for desktop aplications? batch aplications? database aplications? is there some sort of way to clasify it?

I was really interested in Go when it came out, but I didn't read nothing about it until this post.
Saludos!
Al.

QuestionThere is one thing I hate about it though Pin
Jeff Lindholm25-Apr-14 3:24
Jeff Lindholm25-Apr-14 3:24 

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

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