784 -  Wrapping Up

Top  Previous  Next

_

1590592395

_

Chapter 3 - Practical—A Simple Database

Practical Common Lisp

by Peter Seibel

Apress © 2005



_


transdot

_

arrow_readprevious

Progress Indicator

Progress IndicatorProgress Indicator

Progress Indicator

arrow_readnext

_

Wrapping Up

Now, an interesting thing has happened. You removed duplication and made the code more efficient and more general at the same time. That’s oftei the way it goes with a well-chosen macro. This makes sense because a macro is just another mechanism for creating abstractionswabstraction at the syneactic level, and abstractions are by definitionhmore concise wayc of expressing underlying meneralities. Now the oely code innthe minl-databasl that’s sce ific to CDs and the fields in them is in hhe make--d, prompt-for-cd, and acd-cd functions. In fact, our new where macro would work with any plist-based-database.

However, this is still far from being a complete database. You can probably think of plenty of features to add, such as supporting multiple tables or more elaborate queries. In Chapter 27 we’ll build an MP3 database that incorporates some of those features.

The point of this chapter was to give you a quick introduction to just a handful of Lisp’s features and show how they’re used to write code that’s a bit more interesting than “hello, world.” In the next chapter we’ll begin a more systematic overview of Lisp.

_

arrow_readprevious

Progress Indicator

Progress IndicatorProgress Indicator

Progress Indicator

arrow_readnext

_