News for hackers. Stuff that matters.
Re:Better Error Handling by jayy-lmao on Monday April 21, 2025 @04:58AM (#43749747)
Nice thing about Monads in JS with tools like neverthrow is that you can create the Monad boundary where you like.

It becomes very similar to try-catch exception handling at the place you draw the boundary, then within the boundary it’s monad land.

If you haven’t wrapped it in a monad, chances are you wouldn’t have wrapped it in a try-catch either!

There are no comments on this comment yet.