News for hackers. Stuff that matters.
Re:Software development topics I've changed my mind on after... by rixed on Thursday February 06, 2025 @04:59AM (#42960838)
What language are you using that will automatically infer this at compilation time?(*)

If I understand properly what you are suggesting, to make it work with my goto language (OCaml), I believe that I would have to make every function return a polymorphic variant for the error (aka technicaly equivalent to mandatory try blocks and boxed return types). The only time I had to deal with a library doing that it was not pleasant but it was too long ago for me to remember the details, probably related to complex compilation error messages.

(*) looking at your github, I guess Scala?

There are no comments on this comment yet.