Sciweavers

ICFP
2004
ACM

Multi-return function call

14 years 4 months ago
Multi-return function call
It is possible to extend the basic notion of "function call" to allow functions to have multiple return points. This turns out to be a surprisingly useful mechanism. This paper conducts a fairly wide-ranging tour of such a feature: a formal semantics for a minimal -calculus capturing the mechanism; a motivating example; a static type system; useful transformations; implementation concerns and experience with an implementation; and comparison to related mechanisms, such as exceptions, sum-types and explicit continuations. We conclude that multiple-return function call is not only a useful and expressive mechanism, both at the source-code and intermediate-representation level, but is also quite inexpensive to implement. Categories and subject descriptors: D.3.3 [Programming languages]: Language Constructs and Features--control structures, procedures, functions, subroutines and recursion; F.3.3 [Logics and meanings of programs]: Studies of program
Olin Shivers, David Fisher
Added 13 Dec 2009
Updated 13 Dec 2009
Type Conference
Year 2004
Where ICFP
Authors Olin Shivers, David Fisher
Comments (0)