Why I can't inherit from a built in class ARRAY?
(defclass foo (array) (slot1))
Error: #<BUILT-IN-CLASS ARRAY 2044207B> is an invalid superclass of
#<STANDARD-CLASS FOO 21E3A077>.
bobi
From: Pascal J. Bourguignon
Subject: Re: Why I can't inherit from a built in class ARRAY?
Date:
Message-ID: <87ws7f23q9.fsf@galatea.local>
Slobodan Blazeski <·················@gmail.com> writes:
> Why I can't inherit from a built in class ARRAY?
>
> (defclass foo (array) (slot1))
> Error: #<BUILT-IN-CLASS ARRAY 2044207B> is an invalid superclass of
> #<STANDARD-CLASS FOO 21E3A077>.
Because BUILT-IN-CLASS is not a superclass of STANDARD-CLASS.
Notice also that you couldn't use DEFCLASS with a :METACLASS
BUILT-IN-CLASS option, since DEFCLASS pass arguments specific to
STANDARD-CLASS.
I guess you should be able to define a subclass of a built-in-class
using CLOS:ENSURE-CLASS, but this is probably very implementation
dependant.
--
__Pascal Bourguignon__
On Jun 13, 11:12 pm, Slobodan Blazeski <·················@gmail.com>
wrote:
> Why I can't inherit from a built in class ARRAY?
>
> (defclass foo (array) (slot1))
> Error: #<BUILT-IN-CLASS ARRAY 2044207B> is an invalid superclass of
> #<STANDARD-CLASS FOO 21E3A077>.
>
> bobi
you have SBCL user-extensible sequences if that can help you ... of
course it's not portable