| >I also happen like the language on its merits. I also believe that most of those who disagree don't share the design goals of the language designers and wanted mostly just another derivative functional language or some fads-of-the-day-in-academia thing like Scala. Oh, goody, jumping for joy, another Industry Versus Academia holy war! Look here. I think Go has some very, very nice ideas in it. I also think it's fundamentally broken by a couple of stupid decisions the designers made: no exceptions, no parametric polymorphism. I also think it's fundamentally pointed at the wrong problem domain: systems languages don't have runtime libraries, don't have garbage collection and don't require operating systems beneath them so that they can write free-standing systems code. Go is a brilliant, but also broken, competitor against C++, Python, Java, and Erlang (especially Erlang) for the applications-language space, especially highly-concurrent applications (as sometimes handled by Erlang, which I will be happy to see Go murder and replace). Go is not remotely a replacement for C. And the exact reason for these things is that Go ignored parametric polymorphism (aka generics) and left out exceptions (which are messed-up in Java by quite widely useful in real programming!). Now, as to "derivative functional languages", there mostly aren't that many. Most derivative work in functional languages gets fed back into Haskell, and nobody expects you to use Haskell for doing Real Work. Haskell does, after all, have the motto, "Avoid success at all costs." And as to "fads-of-the-day-in-academia", Scala is the single best language I've ever used. And I don't even use all of it. I just use the subset of Scala that is Everything Java Should Have Been. It has lambdas and closures. It has just enough type inference. It has mutability control for slots. It has object orientation and case-classes/pattern-matching and type-classes via implicit parameters. Scala lets me figure out what language paradigm I need to Get Stuff Done. It's the Python of statically-typed languages, and it interoperates with a vast outside ecosystem to boot. I can't say as much for every fad-of-the-decade-in-industry thing like Java or Go. |
This is one of my favorite features of Go. Exceptions are a horrible mess in every language I have seen that has them. They make following control flow basically impossible. They are equivalent to COME FROM.
Go's multiple returns and defer/panic/recover are a much cleaner way to handle errors, not perfect, but way superior to exceptions.
> Go ignored parametric polymorphism (aka generics)
Go didn't ignore parametric polymorphism, Go already has features (interfaces and slices/maps) that provide most of what people use generics for. Go might even get generics some day if a good design for them is found. But the people using Go every day don't miss generics, and that is because the language itself already provides what people needs.
Also note that C lacks both exceptions and generics, and many people still consider it the best language around to build many kinds of systems.