[previous] [up] [next]     [contents] [index]
Next: DrScheme Jr Up: PLT DrScheme: Programming Environment Previous: Contents

Why DrScheme?

Teaching introductory computing courses with Scheme, or any other functional programming language, facilitates many conceptual tasks and greatly enhances the appeal of computer science. Specifically, students can implement many interesting programs with just a small subset of the language. The execution of a functional program can be explained with simple reduction rules that students mostly know from secondary school. Interactive implementations allow for quick feedback to the programmers and make the development of small functions a pleasant experience.

Unfortunately, the poor quality of the available environments for functional languages negates these advantages. Typical implementations accept too many definitions, that is, definitions that are syntactically well-formed in the sense of the full language but meaningless for beginners. The results are inexplicable behavior, incomprehensible run-time errors, or confusing type error messages. The imperative nature of read-eval-print loops often introduces subtle bugs into otherwise perfect program developments. Scheme, in particular, suffers from an adherence to Lisp's output traditions, which often produces confusing effects. In many cases, students, especially those familiar with commercial C++ environments, mistake these problems for problems with the functional approach and reject the approach itself.

To overcome this obstacle, we have developed a new programming environment for Scheme. It fully integrates a (graphics-enriched) editor, a multi-lingual parser that can process a hierarchy of syntactically restrictive variants of Scheme, a functional read-eval-print loop, and an algebraically sensible printer. The environment catches the typical syntactic mistakes of beginners and pinpoints the exact source location of run-time exceptions. The new programming environment also provides an algebraic stepper and a static debugger. The former reduces Scheme programs, including programs with assignment and control effects, to values (and effects). The static debugger infers what set of values an expression may produce and how values flow from expressions into variables. It exposes potential safety violations and, upon demand from the programmer, explains its reasoning by drawing value flow graphs over the program text. Preliminary experience with the environment shows that Rice University students find it helpful and that they greatly prefer it to shell-based or Emacs-based systems.

A paper that discusses DrScheme's educational benefits in more detail is available on the web: http://www.cs.rice.edu/CS/PLT/Publications/. It is published in the proceedings for The Ninth International Symposium on Programming Languages, Implementations, Logics, and Programs, September 1997.


[previous] [up] [next]     [contents] [index]
Next: DrScheme Jr Up: PLT DrScheme: Programming Environment Previous: Contents

PLT