3 ms·
Maybe I'm old, but I can't see any reasons why this is better after looking at the before/after example. This is adding unnecessary complexity with very little
by trungdq88 3y ago
Maybe I'm old, but I can't see any reasons why this is better after looking at the before/after example. This is adding unnecessary complexity with very little benefit (if at all).
If anything, the "try...catch" example actually look clearer and better than "!user.ok".
- redact207 3y agoI think their reasoning is that it's type safe so the compiler complains that you didn't handle something that returns an error.