lisp
lisp copied to clipboard
car and cdr have different behavior when called on empty list
In the interpreter (car ())
and (cdr ())
yield ()
whereas in the compiler both calls result in a type error.
Currently, my preference is for the compilers behavior. It seems like if you ask for the second item of an empty list that is indeed an error. Right now it can be a little confusing but once we get around to improving the compiler's error messages I suspect we can make that error more obvious.