Say we have a slot without :initform
(defclass foo ()
((x :reader x :initarg x)))
How can I check if slot x of an instance of foo is bound?
There is a way to do this with MOP, which I find very ugly. Is there an easier way?
I'd rather resort to:
(defclass foo ()
((x :reader x :initarg x :initform nil)))
and just check if it is nil or not -- in which case x may never be nil (ambiguous).
slot-boundp
. – Shawnee