Re:Errors are values
by NateDad on Tuesday January 13, 2015 @08:47AM
(#8879738)
In languages where they are exceptions and are not returned, but thrown and require special syntax to handle.
[ Parent
| on HN ]
But exceptions are values too, i.e. you routinely have an object of type IOException. All of the patterns presented in the article can be done easily with exceptions.
I think maybe "errors are values" is a general principle and not meant to be specific to Go.
Re:Errors are values
by alecbenzer on Tuesday January 13, 2015 @06:29PM
(#8883300)
Exceptions are values too but they're more than values. "Errors are values" means "errors are values so just deal with them like you do other values".