Condition constructors in Common Lisp

[Tags: common-lisp clos conditions]

TIL that I can do:

(define-condition my-condition () ())
(defmethod initialize-instance :after ((warning my-condition) &key)
  (print "boo"))

The works on SBCL*, CCL, ECL, ABCL, CLISP.

*You need to use MAKE-INSTANCE instead of MAKE-CONDITION to make the constructor fire on SBCL. See https://bugs.launchpad.net/sbcl/+bug/1761735