Hostname: page-component-cc8bf7c57-ksm4s Total loading time: 0 Render date: 2024-12-11T14:58:07.959Z Has data issue: false hasContentIssue false

Multi-return function call

Published online by Cambridge University Press:  10 August 2006

OLIN SHIVERS
Affiliation:
College of Computing, Georgia Institute of Technology, GA, USA (email: shivers@cc.gatech.edu, dfisher@cc.gatech.edu)
DAVID FISHER
Affiliation:
College of Computing, Georgia Institute of Technology, GA, USA (email: shivers@cc.gatech.edu, dfisher@cc.gatech.edu)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

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 article conducts a fairly wide-ranging tour of such a feature: a formal semantics for a minimal $\lambda$-calculus capturing the mechanism; motivating examples; monomorphic and parametrically polymorphic static type systems; 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, at both the source-code and intermediate-representation levels, but also quite inexpensive to implement.

Type
Article
Copyright
2006 Cambridge University Press
Submit a response

Discussions

No Discussions have been published for this article.