Yield: Mainstream Delimited Continuations
Yield: Mainstream Delimited Continuations
复制标题
产量:主流定界延续
DOI:
--
复制
发表时间:
1983
期刊:
影响因子:
--
通讯作者:
A. Sabry
中科院分区:
文献类型:
--
作者:
Roshan P. James;A. Sabry
Many mainstream languages have operators named yield that share common semantic roots but di ff er significantly in their details. We present the first known formal study of these mainstream yield operators, unify their many semantic di ff erences, adapt them to a functional setting, and distill the operational semantics and type theory for a generalized yield operator. The resultant yield , with its delimiter run , turns out to be a delimited control operator of comparable expressive power to shift - reset , with translations from one to the other. The mainstream variants of yield turn out to be one-shot or linearly used restrictions of delimited continuations. These connections may serve as a means of transporting ideas from the rich theory on delimited continuations to mainstream languages which have largely shied away from them. Dually, the restrictions of the various existing yield operations may be treated as shift - reset variants that have found mainstream acceptance and thus worthy of study.