I didn't look to deep so I don't know much about it yet but I find it interesting. Mainly: no exceptions, no OOP, lambdas, integer variants. Also I read some opinions, here they are:
A step backwards in programming language design.
No generic functions/datatypes (except when they say so, because fuck you), no exceptions just because C++ and Java made them look bad, and THE FORCED CAPITALIZATION OF EXPORTED SYMBOLS. THREAD OVER.
Though, I prefer it over chess.
Name:
Anonymous2012-03-27 20:14
Naming a programming language after an extremely common word is stupid because it makes things hard to search for. The English word "Go" is even more common than Ruby or Java. What happened to names like Fortran or Erlang?
The "exception handling" does indeed look like shit. I'd rather use C++. I mean, I'm a C programmer and for me, this: func ff() {
defer func() {
if x := recover(); x != nil {
println("recovering from panic ", x)
}
}
f()
g()
}
func f() {
init()
defer cleanup()
if error() {
panic(42)
}
proceed()
}
is outright unreadable. Following the program flow seems impossible in this example, and we're not even talking "real code".
>>5
That's the point. Go tries to discourage exceptions (as in panic()); they're not to be used unless something absolutely critical happens, no more this bullshit of throwing exception when something has failed to turn string into an int. It's reserved for EXCEPTIONAL situations; for normal error handling, just return an additional value (error)
Name:
Anonymous2012-03-28 1:57
It's a mixed bag in my opinion, like all things.
There are plenty of things I don't like about the language, a few obvious ones:
1. The name (let's make a language called the!).
2. Forced brace style due to auto-insertion of semicolons.
3. panic is weird.
4. Library naming convention is too terse. For example in the syntax package, there is a type called Inst- which is "a single instruction in a regular expression program".
5. Using interface{} as a cheap substitute for generics.
6. new vs make is weird.
7. Having a separate distinction between T and *T for methods is weird.
8. Relies on GC- can't replace C which is what I was hoping for.
And here are some things I do like:
1. The "reverse" type declaration syntax, complex function headers are easy to grok compared to the C counterpart.
2. Interface<->Type is a nice concept. I prefer a level organization as opposed to a bunch of hierarchy.
3. Capitalization for public/private, and similarly gofmt.
4. Fast compiles.
5. Site is clean and organized, to look something up is quick.
>>3 Naming a programming language after an extremely common word is stupid because it makes things hard to search for.
Yeah, they should have named it after a letter of the alphabet.