Effect Systems

OftLisp is a strict language, with side effects. Nonetheless, most effects are not explicitly present. The main examples are errors, (mutable) state, and nondeterminism. The traditional (in Haskell, at least) approach to modelling these effects (possibly in composition) is that of monads and monad transformer stacks. However, in a dynamically typed setting, monad transformer stacks are awkward to use -- since one doesn't have types to help dispatch the lift function, one must have, for example, a lift-error-through-state-to-nondet function. There are alternate approaches, including Kleisli Functors and Algebraic Effects.

Monads

Benefits:

Disadvantages:

Algebraic Effects

Benefits:

Mixed?

Disadvantages:

Kleisli Functors

Benefits:

Disadvantages: