I had a chance to do a bit of Go a year or so ago, and found the language very (how to put it?) bland. There just didn't seem to be anything surprising or obviously better about it.
If the alternative is C++, I can understand the appeal of garbage collection and getting away from the complexities of the STL. But Java provides both. Anyone want to make the case for Go over Java?
A lot of us love bland. Personally working on Scala for my day job and I curse the authors every time I see some neato feature that's been abused by a bored dev or a dev on a deadline.
As far as Go over Java, in terms of differences:
1) Error codes instead of exceptions, big difference, puts Go more in the 'write a server' than 'write an application' category although those lines have been blurred
2) Duck typed interfaces, type inference, automatic delegation and whole bunch of useful little things that make Go, IMO, "Java done right". Regardless of the fact that most of the Go community would want to punch me for calling it that. Go's conventions encourage 2010s Java, Java can sometimes encourage 1990s java.
3) Goroutines being first class is quite different from always instantiating/passing-around an ExecutorService.
4) First class functions and lambdas, although lambdas are a little less useful for not having generics.
These days a lot of the decisions behind which language a person chooses are down to personal preference. So the following points I raise are my personal preferences rather than stating one approach is "better" than another:
For me, that blandness brings great simplicity - which makes it refreshingly easy to learn and write code in that language. It also helps with those "what the hell was I drinking when I wrote that code" moments that even the best of us suffer from time to time.
Also I love the brevity of the code required to build something in Go. I find Java frustratingly verbose.
Lastly, Java is in many ways more portable than Go (compiled Jar's are platform independent and JRE's have been ported to more platforms than Go's compiler), Go's compiler makes targeting other OS's and architectures a doddle plus it's sometimes more convenient to ship a static ELF / PE without worrying about having the appropriate runtime environment at the destination.
There are some things I miss from Go that are present in Java (amongst other languages) such as better support for GUI development, more flexible namespaces and such like. But, for now, Go addresses more desires than it creates complaints.
To expand on "real binaries" a bit. It's somewhat ironic, but distributing statically compiled binaries for common systems is actually easier than distributing source (or bytecode) for VM-based languages like Python, Ruby, and Java.
True statically compiled Linux binaries for complex applications are surprisingly hard; libnss insists on dynamically loading, and libstdc++ doesn't like it either. I think we ended up with unpleasant RPATH hacks to load the copy of the standard libraries that shipped alongside the app rather than the system ones.
Honestly I hadn't thought about it like that, but I would say you're mostly right. It is pretty bland and there's no surprises (or at least only a few), but isn't that a good feature in programming language?
I think it's better than say C og C++, because I have an easier time understand and writing Go, but that's very individual and may not apply to others. I don't like Java because of it's verbosity and overly complex ways of doing simple things, but I haven't looked at Java for years, so that may have changed.
1. Its build tool is simple.
2. It compiles incredibly fast.
3. It is native compilation with no runtime required.
4. It enforces uniform code formatting, and is strict with no compile warnings.
5. It has a standard build tool and standard test tool.
6. It has a standard documentation tool.
7. Only requires a single environment variable GOPATH for all autocompletion to work out of the box WITHOUT an IDE. No IDE project files necessary.
8. Its a decent language that can be learnt quickly.
9. It has CSP.
You are criticizing point 8 out of context, Go is a sum of its parts.
Because Rob Pike made it. And Bjarne Stroustrup didn't.
Rob and Bjarne know each other from Bjarne's time in the Unix lab. The had philosophical differences, Rob tells of Bjarne's storming outbox a conversation.
Some of us trust Rob's judgement, having been treated kindly by it before, so we will walk down his path and trust where it is leading. When Russ Cox joins us, we know for sure that the path will be safe and the walk will do us good.
So you're using a language just because you have some admiration for what its creator accomplished in the past? Even though what he did has nothing to do with languages?
But because Go is the latest of Rob's languages and have spent over 20 years using previous works. It is a relationship built on trust in the concepts. Tackling a language take commitment so it is reassuring when it is built by a team that you trust.
Depends which market. They're used on IBM's Blue Gene, in Sandia Labs supercomputer centre, Los Alamos Super computer centre, at NASA JPL, ran the lighting at Sydney Olympics, are used in Lucent's mobile phones masts.
Vita Nuova is now just one guy, Charles, but I know he makes a living himself working on/consulting for the systems I mentioned. His colleague Rog Peppe, now works for Canonical doing Go.
As I mentioned, Plan9 is used on a few super computer systems for IBM and the DoD.
I had a chance to do a bit of Go a year or so ago, and found the language very (how to put it?) bland. There just didn't seem to be anything surprising or obviously better about it.
If the alternative is C++, I can understand the appeal of garbage collection and getting away from the complexities of the STL. But Java provides both. Anyone want to make the case for Go over Java?