Thursday 7 February 2013

First impressions about Go


It's interesting to see how popularity of programming languages are changing. Objective-C seems to be a pretty tough carnivore in the recent years. Well, iOS gained a huge segment and people love it. However for geeks there is Go.


Go was invented by Google for obvious reasons - they wanted to make and effective and fun language. I was curious what did they put in it to get all those features. I'm gonna be short tonight, I'm only half through of the tutorial.

First it seems like a standard C-like language. They added lazy variable typecasting, which of course helps a lot. They have the tuple like thingies where list of items can be assigned to list of items. These things may sound strange - but at the end it adds up and you really can appreciate how fast you can develop.
Apart from that there are many other shortcuts. I realized it's not just shorter but defines sections in a way that you can read through your code really effectively.
They have nice functional language like helpers, such as array helpers. Some small changes are interesting if you think of them as unnecessary conventions from the past - like semicolons.

A definitely new thing to me is the named returned values. That's also not something that you couldn't achieve before - it just make the current framework more responsive.

I like how variable assignments are scoped when done in control statements. I like that it's dynamic.

So far I've only found the length and capacity of arrays a bit confusing.

Probably the next thing for me is to finish the tour, solve some Euler challenge and find a way to make something that is publish-able and does something.

---

My question for you Go developers - where Go has its benefits? What woud you with it?

Peter

No comments:

Post a Comment

Note: only a member of this blog may post a comment.