Does anyone know what was the historical reason to introduce a dotted pair type to LISP while existing list type covers everything?
Also I am interested in this because dotted pairs often confuse me.
Read McCarthy's 1960 paper, "Recursive Functions of Symbolic Expressions and Their Computation By Machine, Part I".
He starts by defining S-expressions. One of the rules is that if e1 is an S-expression and e2 is an S-expression, then < e1 . e2 >, the dotted pair, is also an S-expression.
A few lines later, he defines the list notation, as a shorthand for an expression built up of a chain of dotted pairs.
This was the paper that first defined what would eventually become LISP. It didn't become an actual programming language until Steve "Slug" Russell implemented the first interpreter.
Existing cons
type covers everything (list-related). Dotted-pair notation is merely syntax for a cons
literal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With