Is there a wildcard in Common Lisp that is eql to any atom?
That is, is there any wildcard such that
(eql wildcard any-atom)
returns true?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No.
The purpose of EQL is to compare for equality of value for certain primitive type objects (numbers, characters) and to compare for identity for all other objects (symbols, arrays, conses, structures, streams, CLOS objects, …).
Thus it makes no sense to have something that is ‘identical’ to everything else. The purpose of EQL is to make the identity testable. Is this thing identical to another thing? But what purpose would be a thing that is identical to all other things, which are already not identical with each other?
The idea of an atom also makes little sense in modern Lisp. By definition everything is an atom, when it is not a cons cell.