3 ms·
Well panic = very serious problem, what do you expect? You can catch them and handle them but it does not means the system is stable. Also defer() will run eve
by Thaxll 3y ago
Well panic = very serious problem, what do you expect? You can catch them and handle them but it does not means the system is stable.
Also defer() will run even if there is a panic.
- groestl 3y ago> but it does not means the system is stable. This is a direct result of Go's lacking error handling, and would not be necessary if they'd have learned from C++ and Java's mistakes, instead of just repeating them.
- skitter 3y ago> panic = very serious problem, what do you expect? Even the Go standard library itself panics (and recovers) when you try to e.g. json-encode a NaN, which doesn't seem like something that should make the system unstable.
- yencabulator 3y agoencoding/json largely moved away from using exceptions internally for errors, I believe due to performance reasons. Also you're making a strawman by equating one explicit intentional use of a specific panic with all panics everywhere.