atom.py |
|
---|---|
|
|
Atoms |
|
McCarthy's Lisp defined two fundamental types: lists and atoms. The class There is currently a disparity in the implementation of Lithp in that atoms are created and stored within the contextual environment and therefore their uniqueness cannot be guaranteed. This is an artifact of implementation and not a problem in emulating McCarthy's Lisp. One point of note is that in the original there were no numbers. Instead, numbers had to be represented as lists of atoms, proving to be quite slow. (McCarthy 1979) Numbers were not implemented until after Lisp 1.5 (TODO what version?) |
|
Symbols |
|
The symbol was the basic atom in Lisp 1 and served as the basic unit of data. In his early papers McCarthy freely mixes the terms atom and symbol. |
|
Truth |
|
The first symbol created is |
|
Logical false is easy -- the empty list |
|
Strings |
|
In McCarthy's original paper (McCarthy 1960) he uses the term string to mean symbols, but later on he mentions them in a different context reagrding their role in something called linear Lisp. I started down the path of implementing linear Lisp also, but got sidetracked. Perhaps I will find time to complete it sometime in the future. In the meantime strings are provided, but are not compliant with the Lisp 1 formalization. The first point of note is that the This class will likely change in the future. |
|
The |
|
|
|
|
|