+#+(or sbcl scl cmu)
+(defun ensure-lazy-reader (class slot-name reader &rest reader-keys)
+ (let ((keys nil)
+ (gf (ensure-generic-function 'slot-unbound)))
+ (dolist (key reader-keys)
+ (push (list 'slot-value 'the-instance (list 'quote key)) keys))
+ (setq keys (nreverse keys))
+ (multiple-value-bind (method-lambda init-args-values)
+ (make-method-lambda
+ gf
+ (class-prototype (generic-function-method-class gf))
+ `(lambda (the-class the-instance the-slot-name)
+ (declare (ignore the-class))
+ (setf (slot-value the-instance the-slot-name) (,reader ,@keys))))
+ (print init-args-values)
+ (add-method gf
+ (make-instance (generic-function-method-class gf)
+ ':specializers (list t class (intern-eql-specializer slot-name))
+ ':lambda-list '(the-class the-instance the-slot-name)
+ ':function `(function ,method-lambda)
+ ;;init-args-values
+ )))))
+