Hacker News new | ask | show | jobs
by melony 1329 days ago
We should set the syntax as "try... catch" and call the feature "exceptions". It will be revolutionary for Go.
2 comments

I do have a lot of trouble figuring out how Go's error handling is meaningfully different in user experience here.

Errors as values seems to sound better in theory then in practice, since in practice everything is type Error, and then I either expect enough from the error to do something about it, or I don't. Which... Is exactly how I use exceptions in Python, replete with mostly having no idea what will get thrown.

But Go makes it somewhat worse because most "error values" are just formatted strings, not actual types.

No thanks, exceptions are awful.