I could, but I just want to explicitly state that there’s a chance for a FileError to happen, and I’m ok with it.
That’s obvious (explicit) in V1. It is not obvious in V2.
As I mentioned, V1 is explicit. You look at it and you know exactly what’s happening.
V2 doesn’t tell me what happens with a FileError. It’s implicit in the code.
As I mentioned, V1 is explicit .you look at it and you know exactly what’s happening.
V2 doesn’t tell you what happens with a FileError. It’s implicit in the code.
Different in Idris, where IO lacks "failure" (Idris lacks exceptions) - readFile is IO (Either FileError String). There's an IOExcept wrapper for IO Either. Fancier stuff like Control.ST.Exception, or File effect with this instead of Either github.com/idris-lang/Idris-…