4 ms·
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 prob
by camus2 9y 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.
- stevedonovan 9y agoYes, Rust would be seriously irritating without try! (and its short friend the question mark operator). So I feel the pain of gophers here.