[[!toc]] The seminar is now going to begin talking about more **imperatival** or **effect**-like elements in programming languages. The only effect-like element we've encountered so far is the possibility of divergence, in languages that permit fixed point combinators and so have the full power of recursion. What it means for something to be effect-like, and why this counts as an example of such, will emerge. Other effect-like elements in a language include: printing (recall the [[damn]] example at the start of term), continuations (also foreshadowed in the [[damn]] example) and exceptions, and **mutation**. We'll focus on this last notion this week. What is mutation? It's helpful to build up to this in a series of fragments... Different grades of mutation involvement... loops instead of recursion before, order never mattered except to avoid divergence. Also, we've give up "referential transparency". ## Side-effects and mutation ## 1. What difference imperativity makes 2. Side-effects in a purely functional setting, via monads 3. [Phil/ling application]Semantics for DPL, using state monad Groenendijk, Stokhof, and Veltman, "Coreference and modality" in Shalom Lappin, ed. Handbook of Contemporary Semantic Theory (Blackwell, 1996) 4. Passing by reference 5. [Phil/ling application] Fine and Pryor on "coordinated contents" (see, e.g., [Hyper-Evaluativity](http://www.jimpryor.net/research/papers/Hyper-Evaluativity.txt))