Declarative programming: The light at the end of the tunnel

Butler Lampson

 

Citation: Declarative programming: The light at the end of the tunnel, in Points of View: A tribute to Alan Kay, Viewpoints Research Institute, Glendale CA, 2010, pp 151-163.

Links: Abstract, Acrobat, Web page, Word

Email: blampson@microsoft.com. This paper is at http://www.research.microsoft.com.

 

Abstract:

I started out to write about declarative programming for this piece, written to celebrate Alan Kay’s 70th birthday. As I thought about it, though, I realized that I don’t really know what declarative programming is. In fact, it seems to be an umbrella term for “the kind of programming we wish we had”. We want to be able to tell the computer what to do, in a way that is easy for us and that reliably and promptly gets us the result we want. But what the computer natively knows how to do is very far removed from this ideal. It knows how to perform very small, very precisely defined state changes on a state space whose main component is an array of a few billion 8 bit numbers.

Successful declarative systems usually have a few things in common: They are a good match to the user’s view of the problem, they are compositional, they give you big primitives, and they have clean escape hatches. Some examples: spreadsheets, SQL queries, parser generators, streaming data flow systems, mashups, Mathematica.

In the end the best definition I could find is that a declarative programming is one that doesn’t have very many steps.