By what standard? I've been very underwhelmed.
The type system is very mediocre. Support for generic programming is awful. What kind of language idiomatically involves casting to the top type? That would be like if Java idiomatically involved casting to Object, or C++ idiomatically involved casting to void*, just to get any sort of genericism. Look at almost any big Go project; the abundance of {}interface typed variables is alarming
And then how about language extensibility? Go relies heavily on built-in keywords, like range and make(). You want to range over a tree or a linked list? Too bad. You can only use built-in types. Or maybe you can wrap your data structure in a chan and range over that. Goodbye performance and simplicity.
Go is not a bad language. I use it on a number of web projects, and it works very well. But Go is not, by any metric I can think of, an "amazing" language. At best, it is a decent language with lots of corporate support, a good standard library, and some good tools like golint, go get, and go fmt.
This statement seems weird to me, so I checked Camlistore (the biggest Go project on my machine). In 65621 LoC there are 306 mentions of interface{}. And Brad does tend to do "clever" things that I probably wouldn't do, so I honestly expected the number to be a lot higher.
It maybe doesn't tickle me on an intellectual level, the way Haskell or Clojure do, sure, but for getting real work done, I'd choose it any day over those two.
Other "exciting" languages that play in the same field as Go are perhaps Rust and D, but neither of those have the same corporate/community support, tools, eco-system, etc.
This also describes Java in 1997. I wouldn't call that an amazing language either.
>Other "exciting" languages that play in the same field as Go are perhaps Rust and D, but neither of those have the same corporate/community support, tools, eco-system, etc.
I don't know enough about D to speak about it, but at least Rust has a good type system (based on hindley-milner), support for generic programming, pattern matching, extensibility, etc. I'd personally call Rust "well-designed".
Agreed. I'd suggest perfect for the world's dark matter devs.
That's amazing tooling, something which can be had even if the language itself is just decent.
I'm not trying to be pedantic; I think the distinction matters.
What I really like is the whole toolchain that comes with it. Fast compile times, cross-compiling, static binaries for easy deployment, gofmt, godoc, gocode, etc.
If it also had an OS coded in it, it would be called Oberon (1992).
For me, go is quite amazing, because when I write something and it compiles, in 90%+ of the cases it does exactly what I wanted it to do. Something that I only achieve in python after using it for at least 5 years and I have only used Go for the last year or so.
m.FindRobot("bot name").GetDevice("laser") would read better as m.Robot("bot name").Device("laser")
Also, Is there a better way, in terms of clarity, to do this:
<- c
Even with the comment I would think the developer forgot to fill in the first half of that and assume it was a bug.
_ = <- c
To show that we don't use the value read from the channel, but someone in my team pointed that, that this isn't very idiomatic and mainly a way to explain what the code does to someone who doesn't know Go.
Also a big fan of golang, loving the posts by people using it in anger.
Thanks