I'm exploring some possibilities of Common Lisp syntax and I wanted to make an :around method on make-instance to return some arbitrary value in some cases. For sake of simplicity, let it be nil, when I don't pass a needed argument. And it works, but not when calling in let:
(defclass foo ()
((bar :initarg := :initform '())))
(defmethod make-instance :around ((type (eql 'foo)) &key =)
(if (not =) nil (call-next-method)))
(print (make-instance 'foo)) ;; => NIL
(print (let …Run Code Online (Sandbox Code Playgroud)