Skip Navigation
Idris @lemmy.ml

How are exceptions handled in Idris?

I've been learning good old Haskell, mostly liking it, but one thing I really dislike is the way exceptions are handled.

It's frustrating that any function can throw just about anything, and this isn't reflected in it's type. Too many times my seemingly sound programs have came crashing down at runtime because some dependency decided to throw an exception. I much prefer the Rust way of doing things where errors are communicated by just returning a value describing it, and panics are reserved for serious trouble (out of memory and the like).

So with that in mind, is Idris for me? I assume that all the usual FP stuff is fine, but how are the exceptions handled?

2 comments