mirror of
https://github.com/dhil/phd-dissertation
synced 2026-03-13 02:58:26 +00:00
Structured interface explanation
This commit is contained in:
17
thesis.tex
17
thesis.tex
@@ -4280,12 +4280,17 @@ the programmer via the handler as a first-class value, and thus, it
|
|||||||
may be invoked, discarded, or stored for later use at the discretion
|
may be invoked, discarded, or stored for later use at the discretion
|
||||||
of the programmer.
|
of the programmer.
|
||||||
|
|
||||||
Effect handlers provide a structured interface for programming with
|
Effect handlers provide a structured and modular interface for
|
||||||
delimited control that operationally augments exception handlers with
|
programming with delimited control. They are structured in the sense
|
||||||
the ability to resume its operations. Effect handlers structured in
|
that the invocation site of an operation is decoupled from the use
|
||||||
the sense that the invocation site of an operation is decoupled from
|
site of its continuation. A handler consists of a collection of
|
||||||
the use site of its continuation -- akin to how the throw-site for an
|
operation clauses, one for each operation it handles. Effect handlers
|
||||||
exception is decoupled from its handling site.
|
are modular as a handler will only capture and expose continuations
|
||||||
|
for operations that it handles, other operation invocations pass
|
||||||
|
seamlessly through the handler such that the operation can be handled
|
||||||
|
by another suitable handler. This allows modular construction of
|
||||||
|
programs, where multiple handlers can be composed to interpret all
|
||||||
|
effects of the whole program.
|
||||||
|
|
||||||
From here onwards I will make a slight change of terminology to
|
From here onwards I will make a slight change of terminology to
|
||||||
disambiguate programmatic continuations, i.e. continuations exposed to
|
disambiguate programmatic continuations, i.e. continuations exposed to
|
||||||
|
|||||||
Reference in New Issue
Block a user