2 ms·
>ignoring an error condition (by either forgetting about it We rely on linters to catch that, which is pretty easy to implement (no expensive intra-procedural
by kgeist 2y ago
>ignoring an error condition (by either forgetting about it
We rely on linters to catch that, which is pretty easy to implement (no expensive intra-procedural analysis needed, which is the case with exceptions).
>Go can abort at any point as well.
Panics, unlike errors, are exceptional situations which generally should not be caught (a programming error, like index out of range). They're usually much rarer than errors.
- gf000 2y agoLinters can't know if a case has been properly handled or not. Just because it logs something it may or may not be the proper semantic way to handle that error.