How do expressions manage to both denote meanings a
nd perform actions? Researchers of programming languages have developed
formalisms and intuition to address this question. I apply the same to
ols to the syntax and semantics of natural languages.

For examp
le, pronouns in natural languages and variable references in programmin
g languages can both be thought to retrieve a value from a storage cell
in memory, and thus analyzed analogously. More generally, _computation
al side effects_ in programming languages (like input and control) are
analogous to _apparently noncompositional phenomena_ in natural languag
es (like questions and quantifiers). Both sides of this analogy can be
treated by giving expressions access to their contexts.

Just as the
order in which a computer executes parts of a program can be modeled i
n the same way for all computational side effects, the order in which a
human processes parts of an utterance can be modeled in the same way f
or all apparently noncompositional phenomena. This notion of processing
uniformly explains such diverse phenomena as crossover in anaphora, su
periority in questions, and ordering effects in polarity licensing and
quantifier scope.

This application of programming-language theory t
o linguistics thus unifies an unprecedented variety of empirical observ
ations. In the opposite direction, I will also mention how linguistics
can contribute to programming-language theory, for example by helping W
eb programmers understand how to manage the interaction between browser
s and servers.