[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GOOPS question
From: |
Atom X |
Subject: |
Re: GOOPS question |
Date: |
Fri, 30 Apr 2021 01:52:56 -0400 |
User-agent: |
K-9 Mail for Android |
Hi Damien,
On April 29, 2021 7:10:12 PM EDT, Damien Mattei <damien.mattei@gmail.com> wrote:
>hi,
>i want to create a growable vector class in Guile,
>such as std::vector or python list,
>first i do not know if it exist already? seems not
>
Regarding your immediate need for a growable vector type, Guile implements
VLists <https://www.gnu.org/software/guile/manual/html_node/VLists.html>, which
can take the place of standard lists, but also offer constant- time index
referencing like vectors. VLists are functional data structures and are thus
immutable, but this is natural for idiomatic Scheme code.
>i want to use GOOPS but i do not understand how the superclass could be
>accessed,used, instanciate...
>for example in the doc there is:
>(define-class <my-complex> (<number>) r i #:name "Complex")
>
>seems <number> superclass is of no use
>
>for my growable vector i would like to use array as superclass?
>but perhaps should it be just a slot as array are a subset of growable
>array ,so a subclass
>
>anyway if i write something ike that:
>(define-class <gvector> (<array>) .....
>how can i use the <array> object?
>
>i think perhaps i should not define a superclass or <object> as super
>class....
>any advice welcome...
>
>Damien
-- Atom