The Eric Naggum archive

I was too young to participate in these discussions when they happened, but it is particularly enlightening (IMHO) to comb through the “Erich Naggum archive”. Sure, there is some of what we might today consider “flaming”, but there are also several insights that are easily lost if not seen for what they are.

Here is an example from the comp.lang.lisp archives.

In Lisp, the fundamental programming concept is the ‘symbolic expression’, or ‘s-expression’ for short.

A s-expression is either an atom or a list of s-expressions. An object of any type except list is called an `atom’. A list whose the first atom is a symbol is called a form, and that symbol defines the meaning of the whole form.

A Lisp program is made up of many, nested forms. The Lisp type system has a large number of types in addition to symbols and lists, both atomic and containers, including numbers of many types, vectors, arrays, and strings, all of which form a type hierarchy.

Lisp has functions that work on objects at any level of this hierarchy. Despite the importance of the list for s-expressions, modern Lisp programs use lists sparingly at run-time. The s-expression is a convenient way to represent code (functions) as objects in the language itself.

It follows that most types can be represented in text form and that they can be printed from a Lisp system. This is often referred to as “code and data are interchangeable in Lisp”, but this applies to the uncompiled form of the code, only.

Lisp is naturally a compiled language, even though it also follows from the above that it is easy to write an interpreter. Toy Lisps are frequently interpreted-only. Unfortunately, most beginners only play with the toy Lisps — many a myth has thus been perpetuated.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s