3 ms·
You can reprogram the reader. But by default the reader knows nothing about a programming language. All it implements is reading of data: numbers, symbols, stri
by lispm 9y ago
You can reprogram the reader. But by default the reader knows nothing about a programming language. All it implements is reading of data: numbers, symbols, strings, vectors, arrays, ...
The reader does not know about functions.
Something like
(defun foo (bar) (+ bar 10))
is for the reader just another list. It does not know that the first symbol has to be DEFUN, that the next item needs to be a symbol, that the next item is a list of arguments and that then a sequence of body expressions follows.
Something like
(defun (bar) foo + (bar 10))
is also a valid list, but it is not a valid Lisp expression. The reader does not know that.