In this chapter, we created a custom REPL to supercharge our text adventure game. Along the way, you learned the following:
The print
and read
functions let you directly communicate with the user through the console. These two functions work in a computer-friendly way.
Other input/output functions are not as elegant as read
and print
, but are friendlier for interacting with humans. Examples include princ
and read-line
.
A homoiconic programming language stores its program code and program data in a similar format. Lisp’s quoting, quasiquoting, eval
, and macro features make it extremely homoiconic.
It’s easy to write your own custom REPL.
It’s simple to transform your internal Lisp data into the format most suitable for your program’s interface. This makes it easy to separate presentation details from your program’s internal data structures.
3.128.226.255