3 ms·
And Go lets you do that. You just return the error. Try writing a few things in Go. I very much doubt you'll respond like this afterwards.
by pmylund 14y ago
And Go lets you do that. You just return the error.
Try writing a few things in Go. I very much doubt you'll respond like this afterwards.
- DeepDuh 14y agoSo I assume it has multiple returns? Some smart built in error class I could actually see that removing the need for exceptions, yes. One new way I've found interesting in obj c is giving functions (an) error handling block argument(s). It nicely does what java unhandled exceptions warnings do: make the user aware of his actions.
- ralph 14y agoYes, it can return a tuple, in Python-speak, and has a pre-declared error type. http://golang.org/ref/spec#Errors http://golang.org/ref/spec#Errors