I’ve very much enjoyed learning and working with Google’s Golang recently. For those unfamiliar with it, it’s a new, open-source programming language from Google. It’s very similar to C in many way, but it’s like C in ‘easy mode’. It’s got garbage collection, it’s compiler is smart enough to figure out what you mean most of the time without you needing to constantly give it hints by declaring your variable types before hand or constantly peppering your source code with semi-colons. It’s strongly typed, but supports interfaces and type-inference allowing you many of the strengths and benefits of more dynamically-typed languages. It compiles to a single static binary with no external dependencies and it’s cross-compiling is excellent and easy to use.
The best feature by far though is how the language just gets out of your way and lets you actually achieve things you want to achieve. Every issue I’ve ever had with it so far has never been down to some stupid issue with the language or some need to set up complex, complicated bootstrapping code, but my own fault, usually some tiny issue in my own code that I couldn’t see because I was too close to it. I also like the fact that it will allow you to take control if you need to. You can deliberately bypass it’s garbage collection and type-safety features by explicitly stating you are going to use unsafe code (which makes it easy to track down where the bugs are coming from since the source clearly states when it’s entering ‘here be dragons’ territory). I’ve not needed to do this, nor have I spent any time integrating with external C libraries (which apparently is also quite easy) but having that flexibility there if I need it is nice - easy mode is great, but only if you can drop under the hood when you need to.
However, Go isn’t perfect. It’s standard library, while full of great stuff, also has some foibles I’m not too pleased with. The net/http library and the net library in general doesn’t have many sane defaults, meaning the simple ‘works out of the box’ quick start methods are mostly useless for anything serious and you’re required to do a lot of work to get something realistically usable. For example, those libraries do not set timeouts by default and setting them for a http server or client means setting up a complete custom net connection to use. Net connections also don’t get tracked in anyway, meaning if you want to do a forced disconnect for shutting down a particular net service your app is running (like the temporary http debug server in my IRC bot), you can’t because you either have to tracking of existing connections and no way to close them all immediately. There are a lot of rough edges like that, but luckily they are all easy to workaround, if a little frustrating. Since Go is still fairly new, I expect many of these issues to be resolved in the near future.