From: Robert Brown <brown@go...> - 2004-06-07 14:58:58
I'm using SBCL version 0.8.8. I just discovered, or rediscovered perhaps,
that SBCL ignores type declarations for instance slots:
* (defclass foo-class ()
((badslot :accessor badslot :initform 100 :type (unsigned-byte 0))))
* (make-instance 'foo-class)
* (badslot *)
I remember there was a discussion about this on the mailing list some time
ago, but I can't seem to find it now. Was the upshot that SBCL omits slot
type checks because of the difficulties associated with subclasses that
redefine slot types? Is it possible to test the type declaration for
validity, even if it's not actively used at run time? It would be nice if
the compiler flagged "(unsigned-byte 0)" as an error, for instance.
Get latest updates about Open Source Projects, Conferences and News.