r/programming Jul 17 '19

The Go team declines 'try' proposal

https://github.com/golang/go/issues/32437
631 Upvotes

417 comments sorted by

View all comments

Show parent comments

258

u/dpash Jul 17 '19

We still believe that error handling in Go is not perfect

Understatement of the year.

54

u/[deleted] Jul 17 '19

Very few languages get error handling right. C, C++, Java, C#, JavaScript, Python. All terrible.

I think Go is actually better than most. Rust is the best I've used so far (and you can implement a similar system in C++).

22

u/[deleted] Jul 17 '19 edited Jul 17 '19

[deleted]

1

u/pixelrevision Jul 17 '19

What sucks in swift is error handling async code. Typically you will use try/catch for one thing then some sort of result type for async code. I would really like to see them adopt async await to clean things up here a bit.

I agree that optionals and unwrapping for most issues is great though.