From: Slobodan Blazeski
Subject: Why I can't inherit from a built in class ARRAY?
Date: 
Message-ID: <d0cf095e-4bc6-4364-b82b-a83b69fda2c2@x3g2000yqa.googlegroups.com>
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__
From: milanj
Subject: Re: Why I can't inherit from a built in class ARRAY?
Date: 
Message-ID: <313ffebe-fdd1-4694-892c-83f5cc469536@h11g2000yqb.googlegroups.com>
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