Re:Maybe adding generics to Go is about syntax after all
by cmrdporcupine on Tuesday September 04, 2018 @01:46PM
(#17911117)
Of course there are, but I wouldn't want to be the one to write them.
[ Parent
| on HN ]
Re:Maybe adding generics to Go is about syntax after all
by artursapek on Tuesday September 04, 2018 @01:53PM
(#17911198)
OK - well, from my 4+ yrs of experience creating and maintaining a big Go project, take it from me that it's really a very pleasant and productive language. I am branching out and learning Rust as an intellectual exercise, but can't help but think about how obtuse its syntax is compared to Go. I will continue to choose Go in the future just because it's so quick to work with (while also providing solid safety and refactoring support). The `interface{}` thing rarely comes up as a problem.
Re:Maybe adding generics to Go is about syntax after all
by piano on Wednesday September 05, 2018 @03:07AM
(#17915651)
It's not just the interface{} thing that's annoying. From my point of view, Go has way to many annoyances to be decent. No constness. No protection against copying. No compiler warnings. Crap error handling. Public/private denoted by uppercase/lowercase letter (WTF?). Implementation details leaking into the language - such as the "typed nil" nonsense. Struct and interface embedding is insane. Multiple returns from functions but no tuples. Needlessly complex `for` syntax, needlessly complex receiver syntax. Needless magic channel operators (they could've easily just been functions).
The tooling is also annoying with the most glaring deficiency being the lack of package versioning, which I believe is going to change (or it has already? I don't remember). And then there are tools like `go vet` which basically just attempt to make up for the compiler deficiencies in sub-par ways...
Go has a very nice runtime, but the language itself and the tooling feels extremely half-baked. I'm curious whether Go 2 will improve upon this.
Re:Maybe adding generics to Go is about syntax after all
by artursapek on Wednesday September 05, 2018 @11:28AM
(#17918842)
All very valid points. I think most of those features were omitted for the sake of simplicity by the Go team. Many people disagree with that.