Say we have a slot without: initform
(defclass foo () ((x :reader x :initarg x)))
How to check if slot x of an instance of foo is tied?
There is a way to do this with a MOP, which I find very ugly. Is there an easier way?
I would prefer:
(defclass foo () ((x :reader x :initarg x :initform nil)))
and just check if it is zero or not - in this case x can never be nil (ambiguous).
source share