Why i like Golang

Some time ago i have started to learn/use GoLang programming language from Google. I'm using it something about one month, maybe little more and i cannot call be a advanced GoLang hacker, but i wrote and continue to write some small projects like:
and thinking about to use it in some more serious projects. Yes one month or something about this not must time, but i have got some opinions about Go for this time and will try to describe some of it in this post and explain why i like this programming language.

Easy to start


Yes, Go is a really easy to start programming language. It doesn't mean that you will create production ready software with it, but you can start to write your "Hello World"-like program through 5-10 minutes. All of you need is only to go through some little stepts:
  1. Go to the official golang site's download page and get golang distributive for your platform
  2. Install it on your workstation
  3. Set up your working environment with $GOPATH
  4. Create working directory with mkdir -p $GOPATH/src/github.com/user and that's all, you can create directory for your first project.
The second Easy-to-Start factor is existence of Golang book, I think it is the best start point for the golang newbies.

Libraries and community


GoLang is young language, appeared in 2009. But despite this it has already big community:
  • golang-nuts - official golang mail listing where you can post your question and get answer. Or just get announces about new versions of golang software;
  • Go+ - Google+ Golang community;
  • @golang - Golang in twitter;
  • #go-nuts at irc.freenode.net - one of my favorite way to talk with gophers;
  • go at stackoverflow - GoLang Q/A.
As i said previously Golang is a really young programming language, but it has big community, yes not so big as java or node.js, but 3K followers for go tag at stackoverflow and 5.3K questsions [Bigger than my favorite erlang :)].

Package management


Golang has a very powerful go command line util and there is my and i think not only my favorite command:
go get ...
This command installs remote packages from version control like Github, BitBucket and etc...

Some recomendations for start to use it:


Concurrency model


Primarily i am erlang developer and it was important to me support of concurent programming in GoLang. And it met my expectations.

go foo();

And that's all, foo function runs concurently.

Defer


I think we are all forget to clean resources in our program :) GoLang provides awesome mechanism to avoid this something like this:

Conclusion


So, it was part of GoLang related thinks which i had glimpsed and liked for the last month. I'm very interesting also how do you using GoLang at work or for yourself, what do you like or don't like in it, write me a comment.

Links



Comments