[Openmcl-devel] :default-initargs for ns-object subclasses

Gary Byers gb at clozure.com
Thu Jan 3 07:43:05 PST 2013


My best guess/fuzzy recollection is that this is just an oversight.  I'll try to
look at it as soon as I stop sneezing, which should be any day now.

On Wed, 2 Jan 2013, Paul Krueger wrote:

> Is this expected / correct behavior?
>
> ? (defclass tst3 (ns:ns-object)
>    ((s1 :accessor s1 :initarg :s1))
>    (:default-initargs :s1 4)
>    (:metaclass ns:+ns-object))
> #<OBJC:OBJC-CLASS TST3 (#x27D575A0)>
> ? (slot-boundp (make-instance 'tst3) 's1)
> NIL
> ? (slot-boundp (make-instance 'tst3 :s1 3) 's1)
> T
>
> :default-initargs are ignored for initialization of ns:ns-object subclasses. I can do the equivalent slot initialization in an initialize-instance :after method for this class and that works ok, but this behavior surprised me.
>
> I'm running 1.9-dev-r15527M-trunk  (DarwinX8664)
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list