Go Programming Language  

I have spent some time to learn and practice Go Programming Language.

The staring point is this article, How We Moved Our API From Ruby to Go and Saved Our Sanity. Project changed from Ruby to other language is not fresh. But this time, I would like to try, too. Because in my experience, by using Sinatra/Ruby for my small website, I am not quite happy about the performance either. In the meantime, I want to try concurrent feature in Go. So I learn.

I try to implement some script in Go, and then try to establish web server using go-martini with mgo. Here’s the demo and Github

The first surprising is that, the code is quite simple and clean. I must admit that I am quite satisfied with Ruby syntax. I like block and many syntax sugar it provided. At begin I complain about all the error-handling idiom in Go. But after some script, I found it provided a good idiom to user. If I am in hurry, I can always use _ to throw away. But it indeed provided kind of more safety style in coding. Also does the include file checking. It’s noise, but it’s truly more safer in long term development. *I believe that error message in compiler time is better than panic in run time. *

Recently I saw several articles and discussions about Golang. The state of Go in market and its future has some discussion about whether to learn Go or not. Why Golang is doomed to succeed has a good review about the direction and goal of language. I kind of agreed with this article.

Golang is straight-forward language to C/C++ programmer. It targets to be used in large development project and in practical way. It maybe not be exciting to new language learner, but it’s useful. That’s my so far comment about it.

My next step is to learn Gokogiri. I like [Nokogiri] in Ruby and it’s good to see that there exist replacement in Go. And I may try to play a bit with mecab and see what I can come up with some interesting information in 青空文庫. And Project Euler !!

 
1
Kudos
 
1
Kudos

Now read this

Website beta with Auth system

http://hikarihe.com/lines Recent days I finished first beta version of website. I use Mongodb with Sinatra, using tag for grouping, and with simple auth system(hand-crafted). I plan to add “Add to Favorite” button in each Stickers and... Continue →