Re:Anti-if: The Missing Patterns
by icebraining on Friday June 10, 2016 @04:34AM
(#11875053)
Also known as multiple dispatch, which is supported by many languages: https://en.wikipedia.org/wiki/Multiple_dispatch
If we call (make-sound bear-instance <any other value>), then the first specialization takes over. It's specialize to T, the grand superclass, so it is a fallback that takes anything. Any value other than nil serves as a Boolean true in Lisp.
It's a magic of Lisp that T stands for "any type" as well as "true". :)
I don't know whether treating Booleans as method parameters like this is good design, but I don't see any immediate down sides.