3 ms·
No, it's not. Go handles errors via exceptions (which Go calls panic and recover) and return codes (and "defer" is just "finally"). In other words, Go has a mix
by pcwalton 15y ago
No, it's not. Go handles errors via exceptions (which Go calls panic and recover) and return codes (and "defer" is just "finally"). In other words, Go has a mix of C-style and Java-style error handling; it doesn't have any more features than either of them. (This is of course totally fine; Java's exception system is not a bad exception system.)
What the post is asking for is more like Common Lisp's condition system.
- huggah 15y ago> Whenever an exception happens, programmers could twiddle a few variables and set the program back to where it was before. This is missing. The first point of the OP is entirely as described though.