Exception handlers in functional programming languages
- 1 January 1993
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 19 (8) , 826-834
- https://doi.org/10.1109/32.238585
Abstract
Constructs for expressing exception handling can greatly help to avoid clutter in code by allowing the programmer to separate the code to handle unusual situations from the code for the normal case. The author proposes a new approach to embed exception handlers in functional languages. The proposed approach discards the conventional view of treating exceptions, as a means of effecting a control transfer; instead, exceptions are used to change the state of an object. The two types of exceptions, terminate and resume, are treated differently. A terminate exception, when raised, is viewed as shielding the input object. On the other hand, a resume exception designates the input object as curable and requires the immediate application of a handler function. This approach enables the clean semantics of functions raising exceptions without associating any implementation restriction and without loss of the referential transparency and the commutativity properties of functions.Keywords
This publication has 7 references indexed in Scilit:
- Exception handling in a parallel functional language: PSMLPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2003
- Gerald: An Exceptional Lazy Functional Programming LanguagePublished by Springer Nature ,1990
- An axiomatic treatment of exception handling in an expression-oriented languageACM Transactions on Programming Languages and Systems, 1987
- How to replace failure by a list of successes a method for exception handling, backtracking, and pattern matching in lazy functional languagesPublished by Springer Nature ,1985
- Exception Handling and Software Fault ToleranceIEEE Transactions on Computers, 1982
- Exception handlingCommunications of the ACM, 1975
- System structure for software fault toleranceIEEE Transactions on Software Engineering, 1975