Skip to main content
Spelling, wording.
Source Link
Kaz
  • 3.7k
  • 1
  • 21
  • 32

I will give you the philosophical answer to your philosophical question:

It seems to me that the list terminator in Lisp could be any arbitrary value. [...] Is there a philosophical reason why the empty list was chosen to terminate lists?

The answer to your question is this: the list terminator is an arbitrary value. It is so arbitrary that different Lisp dialects use a different value for it and yet remain conceptually compatible.

Common Lisp uses a symbol object: the symbol nil. A symbol! What does a symbol have to do with lists? Nothing.

(Except that when we work with mathematical objects with pencil and paper, we use symbols. A circle with a dash through it or {} represent an empty set, etc. So why not use machine symbols similarly?)

Scheme uses an empty list, the object () which is not a symbol.

The Scheme () and the Common Lisp nil are quite different, yet they adequately terminate a list, exactly in line with your observation that it could be any arbitrary value!

So therefore, is there a philosophical reason why the empty list terminates lists? Yes! The reason is that any object which is understood to terminate a list is, by definition, the empty list. If you use the number 42 as the list terminator, then () means 42.

Mathematically, every list has the empty list as its suffix (just like every set has the empty set as a subset). Since the Lisp list representation is suffix-based (a non-empty list is an reference to an object holding the first element, and the suffix of that list), there has to be something to handle the case when a list has just one element, and its proper suffix is (mathematically) the empty list. Whatever object is installed as the suffix is then understood to be the empty list, and might as wellfor the sake of consistency and unity, that object better be used as the representation of the stand-alone empty list also, not only as the representation of the empty suffix of the one-element list.

I will give you the philosophical answer to your philosophical question:

It seems to me that the list terminator in Lisp could be any arbitrary value. [...] Is there a philosophical reason why the empty list was chosen to terminate lists?

The answer to your question is this: the list terminator is an arbitrary value. It is so arbitrary that different Lisp dialects use a different value for it and yet remain conceptually compatible.

Common Lisp uses a symbol object: the symbol nil. A symbol! What does a symbol have to do with lists? Nothing.

(Except that when we work with mathematical objects with pencil and paper, we use symbols. A circle with a dash through it or {} represent an empty set, etc. So why not use machine symbols similarly?)

Scheme uses an empty list, the object () which is not a symbol.

The Scheme () and the Common Lisp nil are quite different, yet they adequately terminate a list, exactly in line with your observation that it could be any arbitrary value!

So therefore, is there a philosophical reason why the empty list terminates lists? Yes! The reason is that any object which is understood to terminate a list is, by definition, the empty list. If you use the number 42 as the list terminator, then () means 42.

Mathematically, every list has the empty list as its suffix (just like every set has the empty set as a subset). Since the Lisp list representation is suffix-based (a non-empty list is an reference to an object holding the first element, and the suffix of that list), there has to be something to handle the case when a list has just one element, and its proper suffix is (mathematically) the empty list. Whatever object is installed as the suffix is then understood to be the empty list, and might as well be used as the stand-alone empty list also.

I will give you the philosophical answer to your philosophical question:

It seems to me that the list terminator in Lisp could be any arbitrary value. [...] Is there a philosophical reason why the empty list was chosen to terminate lists?

The answer to your question is this: the list terminator is an arbitrary value. It is so arbitrary that different Lisp dialects use a different value for it and yet remain conceptually compatible.

Common Lisp uses a symbol object: the symbol nil. A symbol! What does a symbol have to do with lists? Nothing.

(Except that when we work with mathematical objects with pencil and paper, we use symbols. A circle with a dash through it or {} represent an empty set, etc. So why not use machine symbols similarly?)

Scheme uses an empty list, the object () which is not a symbol.

The Scheme () and the Common Lisp nil are quite different, yet they adequately terminate a list, exactly in line with your observation that it could be any arbitrary value!

So therefore, is there a philosophical reason why the empty list terminates lists? Yes! The reason is that any object which is understood to terminate a list is, by definition, the empty list. If you use the number 42 as the list terminator, then () means 42.

Mathematically, every list has the empty list as its suffix (just like every set has the empty set as a subset). Since the Lisp list representation is suffix-based (a non-empty list is an reference to an object holding the first element, and the suffix of that list), there has to be something to handle the case when a list has just one element, and its proper suffix is (mathematically) the empty list. Whatever object is installed as the suffix is then understood to be the empty list, and for the sake of consistency and unity, that object better be used as the representation of the stand-alone empty list also, not only as the representation of the empty suffix of the one-element list.

Typography.
Source Link
Kaz
  • 3.7k
  • 1
  • 21
  • 32

I will give you the philosophical answer to your philosophical question:

It seems to me that the list terminator in Lisp could be any arbitrary value. [...] Is there a philosophical reason why the empty list was chosen to terminate lists?

The answer to your question is this: the list terminator is an arbitrary value. It is so arbitrary that different Lisp dialects use a different value for it and yet remain conceptually compatible.

Common Lisp uses a symbol object: the symbol nil. A symbol! What does a symbol have to do with lists? Nothing.

(Except that when we work with mathematical objects with pencil and paper, we use symbols. A circle with a dash through it or {} represent an empty set, etc. So why not use machine symbols similarly?)

Scheme uses an empty list, the object () which is not a symbol.

The Scheme () and the Common Lisp nil are quite different, yet they adequately terminate a list, exactly in line with your observation that it could be any arbitrary value!

So therefore, is there a philosophical reason why the empty list terminates lists? Yes! The reason is that any object which is understood to terminate a list isis, by definition, the empty list. If you use the number 42 as the list terminator, then () means 42.

Mathematically, every list has the empty list as its suffix (just like every set has the empty set as a subset). Since the Lisp list representation is suffix-based (a non-empty list is an reference to an object holding the first element, and the suffix of that list), there has to be something to handle the case when a list has just one element, and its proper suffix is (mathematically) the empty list. Whatever object is installed as the suffix is then understood to be the empty list, and might as well be used as the stand-alone empty list also.

I will give you the philosophical answer to your philosophical question:

It seems to me that the list terminator in Lisp could be any arbitrary value. [...] Is there a philosophical reason why the empty list was chosen to terminate lists?

The answer to your question is this: the list terminator is an arbitrary value. It is so arbitrary that different Lisp dialects use a different value for it and yet remain conceptually compatible.

Common Lisp uses a symbol object: the symbol nil. A symbol! What does a symbol have to do with lists? Nothing.

(Except that when we work with mathematical objects with pencil and paper, we use symbols. A circle with a dash through it or {} represent an empty set, etc. So why not use machine symbols similarly?)

Scheme uses an empty list, the object () which is not a symbol.

The Scheme () and the Common Lisp nil are quite different, yet they adequately terminate a list, exactly in line with your observation that it could be any arbitrary value!

So therefore, is there a philosophical reason why the empty list terminates lists? Yes! The reason is that any object which is understood to terminate a list is, by definition, the empty list. If you use the number 42 as the list terminator, then () means 42.

I will give you the philosophical answer to your philosophical question:

It seems to me that the list terminator in Lisp could be any arbitrary value. [...] Is there a philosophical reason why the empty list was chosen to terminate lists?

The answer to your question is this: the list terminator is an arbitrary value. It is so arbitrary that different Lisp dialects use a different value for it and yet remain conceptually compatible.

Common Lisp uses a symbol object: the symbol nil. A symbol! What does a symbol have to do with lists? Nothing.

(Except that when we work with mathematical objects with pencil and paper, we use symbols. A circle with a dash through it or {} represent an empty set, etc. So why not use machine symbols similarly?)

Scheme uses an empty list, the object () which is not a symbol.

The Scheme () and the Common Lisp nil are quite different, yet they adequately terminate a list, exactly in line with your observation that it could be any arbitrary value!

So therefore, is there a philosophical reason why the empty list terminates lists? Yes! The reason is that any object which is understood to terminate a list is, by definition, the empty list. If you use the number 42 as the list terminator, then () means 42.

Mathematically, every list has the empty list as its suffix (just like every set has the empty set as a subset). Since the Lisp list representation is suffix-based (a non-empty list is an reference to an object holding the first element, and the suffix of that list), there has to be something to handle the case when a list has just one element, and its proper suffix is (mathematically) the empty list. Whatever object is installed as the suffix is then understood to be the empty list, and might as well be used as the stand-alone empty list also.

Source Link
Kaz
  • 3.7k
  • 1
  • 21
  • 32

I will give you the philosophical answer to your philosophical question:

It seems to me that the list terminator in Lisp could be any arbitrary value. [...] Is there a philosophical reason why the empty list was chosen to terminate lists?

The answer to your question is this: the list terminator is an arbitrary value. It is so arbitrary that different Lisp dialects use a different value for it and yet remain conceptually compatible.

Common Lisp uses a symbol object: the symbol nil. A symbol! What does a symbol have to do with lists? Nothing.

(Except that when we work with mathematical objects with pencil and paper, we use symbols. A circle with a dash through it or {} represent an empty set, etc. So why not use machine symbols similarly?)

Scheme uses an empty list, the object () which is not a symbol.

The Scheme () and the Common Lisp nil are quite different, yet they adequately terminate a list, exactly in line with your observation that it could be any arbitrary value!

So therefore, is there a philosophical reason why the empty list terminates lists? Yes! The reason is that any object which is understood to terminate a list is, by definition, the empty list. If you use the number 42 as the list terminator, then () means 42.