As can be seen, the notational overhead of full statically
checked "exceptional" procedures implemented in a language with
no actual support for them is tolerable. Language designers
developing new languages could quite easily provide syntactic
sugar for the above to emulate imperative features. If the
system described here was actually baked into a general purpose
language, it would presumably be reasonably easy to have the
compiler generate functions such as
r_motor and
r_io. With sum types and
pattern matching present in the language, it suddenly becomes
much easier to have functions deal with a single exception type
as opposed to, for example, lists of checked exceptions as in
Java.
Experienced functional programmers are probably screaming
"monad" at the screen. The procedure
abstraction is, of course, a combination of the IO and error monads.