Hacker News new | ask | show | jobs
by camus2 3220 days ago
No, go "errors" are just a convention, there is absolutely nothing special about them.

Go has panic/defer, which are exceptions, but done badly. They were probably retrofitted in the language when its creators realized they needed exceptions anyway, which makes the whole "error as value" a bit hypocritical. If they truly cared about error as value, then yes, Go would support some form of try! macro.

1 comments

Yes, Rust would be seriously irritating without try! (and its short friend the question mark operator). So I feel the pain of gophers here.