The Power Of S-Expressions

In view of the fact that my last few posts have concentrated on the use of S-expressions to represent data—in particular, to represent log file entries—this seems like a good time to link to S-expressions: The most powerful data structure available over at The (λ) Lambda Meme — all things Lisp. This post argues that sexprs are the most powerful data structure currently available and that they can represent arbitrarily complex data.

We saw a small example of that in our exploration of using sexprs to represent log data. Although the record structure we used was fairly simple, it's obvious that we could represent any log record structure with an sexpr. Combine that will the ability to make them executable in a direct and easy way and you have a powerful tool.

The reason for the power of the sexpr, The Lambda meme argues, is that sexprs can be used to represent graphs and graphs can model the associations among multiple data. They also say that S-expressions are really all there is to understand about Lisp and once you do understand them, the rest is just a few details. I'm not sure it's quite that simple but it is true that S-expressions are the soul of Lisp.

In any event, the linked post is short and interesting and worth a read.

This entry was posted in Programming and tagged , . Bookmark the permalink.