15-312 Foundations of Programming Languages
Lecture 14: Mutable Storage
After discussing several advanced type constructs (universal,
existential, recursive), we return to extending the underlying
computational mechanisms. Besides pure functional computation, we have
considered exceptions and continuations, which are so-called control
effects. In this lecture we discuss a so-called store
effects, where the abstract machine maintains a global store that
can be updated destructively. This allows efficient implementation of
some algorithms that may otherwise be difficult to express purely
functionally. On the other hand, it is often overused when it is not
strictly necessary.
Mutable storage changes the nature of the language significantly and
it makes it more difficult to reason about, because an expression does
not just return value, but could change computational state. In
the following lecture we discuss an alternative approach that provides
for a cleaner separation of effects from pure (that is, effect-free)
computation. As we will see, this also has some costs.
[ Home
| Schedule
| Assignments
| Software
| Resources
]
fp@cs
Frank Pfenning
|