<< first < prev 1 2 3 4 5 6 7 8 9 next > last >> Addendum

Ok, now lets talk about some issues that were glossed over in this tutorial...

First of all, Clojure Lisp has a very well thought out system for defining variables and changing their value. In this tutorial, we use the def command exclusively to set and change the values of global variables to keep track of the state of our game world. You would almost never do this in a "real" Clojure program. Instead, you would want to read up on Refs, Atoms, and Agents, which offer a much cleaner and thread-safe way of managing data in a Clojure program.

Another major cheat that we made in this tutorial is that we wrote our game sentences using symbols

'(this is not how Lispers usually write text)
"Lispers write text using double quotes"

Symbols have a special meaning in Clojure (and other Lisps) and are used to store unique names of functions, variables, and other things. Because of this, Lisp treats symbols in special ways that are awkward for text messages. Using strings instead of symbols allows text we work with to not be affected by any such quirks, but requires more esoteric commands for manipulating text. Also, working with strings is not so relevant to teaching the far more important symbol manipulation commands in Lisp.

Another glossed over issue is that SPELs are more commonly referred to as "Lisp true macros" and are created with the defmacro command, which is very confusing for teaching purposes. Read the following short essay as to why I think this name distinction is beneficial. And finally, there are ugly name collisions that can happen when a SPEL is written in the style of the game-action SPEL. If you read more advanced lisp materials this will be explained in greater detail.

Q. What should I read next to expand my knowledge of Lisp?

A. There are many great (and some downloadable) Lisp books available at the cliki website.

If you're interested in the most intense theoretical text, I would recommend the free ebook version of On Lisp by Paul Graham. The other books he has written and the essays on his website are also fantastic.

If you're interested in a more pragmatic tack, many Lispers are excited about the book "Practical Common Lisp" by Peter Seibel. His book is also available on-line.

<< first < prev 1 2 3 4 5 6 7 8 9 next > last >> Addendum