Hacker News new | ask | show | jobs
by trungdq88 969 days 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".

1 comments

I think their reasoning is that it's type safe so the compiler complains that you didn't handle something that returns an error.