News for hackers. Stuff that matters.
Re:Parse, Don't Validate by sriram_malhar on Monday July 22, 2024 @07:19AM (#41033130)
Yes, that's true. But Lisp is untyped.

The notation [a] could just as easily have meant a non-empty list

Re:Parse, Don't Validate by HelloNurse on Monday July 22, 2024 @07:52AM (#41033376)
It is necessary to represent the empty list whose elements (if it had any) are type A, and its type must be the same as a nonempty list of A, because concatenating the two must be a well-defined and representable operation while concatenating empty lists of different types must be as wrong as concatenating nonempty ones. Moreover, in practice most variables, function parameters and the like should be declared as a possibly empty list of A, without special cases.