This is an open-ended individual assignment. There are no secret right answers. Instead, we want you to think about this question several times, refining your answer repeatedly, exercising your design taste and sense of proportion.

In our very first lecture, we discussed how diverse programming languages are, and how many seemingly benign documents and data formats can be viewed as programming languages. In the course, we study a language as a collection of control constructs (things that do), data structures (things that are), and idioms for the best use of the control and data.

Suppose you were asked to give a computer-based presentation. Your talk consists of a sequence of slides, each of which contains some combination of textual and graphical information. You could write a program (for instance, in Java) to present this material, but you're much more likely to use a presentation package such as PowerPoint, Keynote or OpenOffice. (While these packages have minor differences, we will focus on their similarities, which are much greater.)

Consider also that these presentation packages have important weaknesses. Consider two examples:

  1. Users cannot describe and name reusable abstractions (such as sections of talks), making it difficult to reconfigure a set of slides into different talks for different audiences. Yet in a traditional language, this kind of abstraction is trivially provided by a method or function.
  2. It's difficult to describe one slide relative to another. The content of slide A can resemble that on slide B only by using copy-and-paste; but when B changes, those changes do not immediately propagate to A. A user cannot say ``make A be like B, modified in the following fashion''. Yet in a traditional language, it's easy to write a program that describes the transformation of one data structure into another, and therefore captures the relationship between them.

As experienced programmers, we find this situation frustrating. We want both the convenience of a language customized to slideshows, and the abstraction power of a general-purpose language. Can we extend a traditional programming language—which has mechanisms for abstraction and reuse—with features to make it easy to describe slides and slide-shows? What key data and control constructs would we need to add to a traditional language to enable this? And would aspects of a traditional language get in the way?

Your task is to think about extending Scheme or Java to enable slide-shows. (If you haven't had prior exposure to presentation software, you would do well to play with them a little to get some insight into what does and doesn't well about them.) Answer all of these questions in a single, cohesive, two to three page essay.

  1. What primitive data would you add to the language? What are the compound data constructors, if any?
  2. What control constructs would you add?
  3. Are there things found in the base language that you would *not* want? What and why?
  4. Would it be better if the base programming language used lazy rather than eager evaluation?

Handin

Submit a dummy file to WebCT and turn in a paper copy to the handin bin.

Changes

Clarified that we want a single essay, not enumerated responses to the questions.