3 ms·
> it's surprisingly simple. Actually, that's its fundamental design. They reduced everything down to a very small core with very little features, so things wou
by Slackwise 10y ago
> it's surprisingly simple.
Actually, that's its fundamental design. They reduced everything down to a very small core with very little features, so things would be obvious and you don't have to learn or remember much. It's refreshingly simple!
With that said, I'd say they reduced it too far down. There's no generics so you end up using `interface{}` everywhere which often leads to issues due to its late binding. Or you end up just using codegen tools, IIRC.
Also since there are no exceptions, you end up with constant checks for error code returns, which end up usually just being strings and not much else. Not saying exceptions are the best way to approach error handling, but they do allow you to reverse through an entire function call stack and clean up any state along the way, along with adding more granular error information you can write handlers to react to. Go reminds me of the pain that was C error handling and juggling error codes.
- yahyaheee 10y agoYeah, I totally agree. I think they did some smart rework of the fundamentals, but there are a lot of other parts that are needlessly painful. I would like to see things like Go channels and Go's build system brought up with some modern features. If only the Go community wasn't so ridiculously stubborn!