Home > Articles > Programming

  • Print
  • + Share This
From the author of

Interactive Environment

When Lisp was created, writing a program in an assembly language typically involved typing onto tape or punch cards and feeding them into the computer along with an assembler program, getting the binary out, possibly running it through a linker, and then running it. Fortran programs involved a similar process, with the compiler replacing the interpreter.

Lisp introduced the idea of the read-evaluate-print loop (REPL). The environment read a line of Lisp code, evaluated it, printed the result, and then looped back to the start of the process. This change allowed for incremental development, where you gradually wrote a function, tried calling it, tested that it worked, and then moved on to the next bit of code. This system made development significantly faster. Compiling a Fortran program on a machine of the time could take minutes if you were lucky, hours if you weren't. If you encountered a bug, you had to return to the source code, modify it, and redo the entire process from the start.

A Lisp programmer, in contrast, got immediate feedback if he'd done something wrong. More importantly, he could easily see where he'd done something wrong, because he could test each part of the program in turn.

This interactive structure is now common in interpreted languages. Python, Erlang, and so on all provide similar interfaces. The most interesting thing about the Lisp version is that it implemented incremental compilation very early on. In 1962, the MIT implementation of Lisp would compile expressions that were entered in the REPL mode.

  • + Share This
  • 🔖 Save To Your Account