News for hackers. Stuff that matters.
Re:The Roots of Lisp (2001) by kazinator on Thursday January 16, 2020 @01:08PM (#22067160)
In traditional Lisp and common Lisp, and similar dialects, the symbol t is customarily used as the catch all last case.

There is an interesting situation is in the case family of constructs which match an input value against keys, in Common Lisp.

Inspired by cond, the t symbol also serves as the fallback in case when the key doesn't match the other cases. So that is to say:

   (case (expr)
     (a ...)
     (b ...)
     (42 ...)
     (t ...))  ;; <-- this isn't matching on the t symbol!
Common Lisp also supports the symbol otherwise in place of t.

But the programmer may also sometimes have the t symbol as a specific key value; or likewise the otherwise symbol. That requirement is handled by putting the key into a list:

   (case (expr)
     (a ...)
     ...
     ((t) ...))  ;; <- match on t

There are no comments on this comment yet.