I’ve done some searching (via Google, naturally, since “Go” is too short for vB search), and it looks like it’s never come up.
Has anybody here used Google’s Go language? Its intent is to be a garbage collected systems language to be used in place of C, Java, etc with a focus on making concurrency easier. Obviously it has a long way to go – for one while the library is growing, it doesn’t even have the meager support that Lua or Python have for various things. For instance, its (non-official) OpenGL package pretty much only works on a handful of Linux distros. Granted Go has a built in package “CGo” which will let you wrap C fairly easily, but still.
One thing about it that I think will make it a bit of a love it/hate it language is the fact that it intentionally lacks support for a number of things in the same family/paradigm as it (meaning a structured, procedural language) with no intention to add them. Things like method overloading, generic typing, default values, and so on were intentionally excluded to make you work within Go’s paradigm. In some ways it’s a bit pompous and annoying, but I can’t deny that it kind of works. It really is almost an authoritarian language in many ways, for instance, all programs are supposed to be formatted by gofmt, a formatter distributed with the compiler. Hell, the compiler doesn’t have warnings, only errors, and it’s an error if the curly brace is on the wrong line – or if there’s an unused import.
I have to say I kind of dig it though. I feel like Go’s inherent structure caters to the way I think about problems as a programmer, while imposing enough order to keep me from ruining things by trying to be too clever for my own good. It has a lot of allowances, like no need for forward declarations (okay, that’s not exactly a novel feature, but I’m tired right now and can’t think of a better example), but its order is clear and flows naturally from the specifications – i.e. if it calls you out on something it’s pretty predictable and easy to fix. No horrendous time-consuming bug hunts that things like circular inclusion errors can cause.
One thing I worry about is their concurrency support. On one hand, they’ve basically all but eliminated 90% of the things that make concurrency an absolute pain to set up and use. On the other hand, concurrency can be a huge pain to debug, regardless of memory access issues. It does worry me that if you use concurrency to the degree that they seem to encourage, that non-trivial systems could quickly (and even unintentionally if you’re working with multiple people) become a morass of a couple dozen pseudo-threads that do no real harm performance-wise, but because everything is being passed through channels and not easily traceable method calls, impossible to find exactly where things are going wrong. I guess this is a problem with event-based or component based environments already, but I can see it making things difficult to manage if you’re not very careful.
Then again, in the language tour the example of comparing two binary trees with channels was pretty damned clever.