An Exceptional Programming Language

The use of exceptions in programming languages is usually reserved for exceptional conditions. This is a narrow view of exceptions, however. We demonstrate how exceptions can be used to express common programming language constructs, and thus form the basis of a new type of exception-based programming language. We also generalize exceptions so that they may be thrown into a program’s future execution, not just its past. Implementation techniques for both generalized and traditional exceptions are presented.