How to force slot's type to be checked during make-instance?
Let's say I have the following class declaration: (defclass foo-class () ((bar :initarg :bar :type list))) When I create an instance of this class, make-instance won't check whether passed arguments satisfy types of slots. So, I can create "invalid" objects this way: > (make-instance 'foo-class :bar 'some-symb) #<FOO-CLASS {102BEC5E83}> However, what I'd like to see is the behavior similar to the creation of an instance of a struct, where the types are checked: (defstruct foo-struct (bar nil :type list)) > (make-foo-struct :bar 'some-symb) ;; raises contition: ;; ;; The value ;; SOME-SYMB ;;