From: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
To: Maxime Devos <maximedevos@telenet.be>
Cc: Guile User <guile-user@gnu.org>
Subject: Re: #:printer filed in language specification.
Date: Mon, 20 Sep 2021 08:04:50 +0000 [thread overview]
Message-ID: <c4331b48-d541-431d-b59d-4e79d33f8ae4@posteo.de> (raw)
In-Reply-To: <c85780b9cb5cbe70085a953a89a3b44047586139.camel@telenet.be>
Hi Maxim!
Thank you for your reply!
I do not know how to create such a vtable, what it means to have a vtalbe which
is `<applicable-struct-vtable>` or how to set it for a struct, but I should have
a look at the manual and see, what comes up when searching for vtable.
Regards,
Zelphir
On 9/19/21 2:24 PM, Maxime Devos wrote:
> Zelphir Kaltstahl schreef op zo 19-09-2021 om 12:11 [+0000]:
>> Hi Maxim!
>>
>> Do you know of any simple example anywhere for applicable structs? I might have
>> another use for them.
> From NEWS in the Guile source code:
>
> ** Applicable struct support
>
> One may now make structs from Scheme that may be applied as procedures.
> To do so, make a struct whose vtable is `<applicable-struct-vtable>'.
> That struct will be the vtable of your applicable structs; instances of
> that new struct are assumed to have the procedure in their first slot.
> `<applicable-struct-vtable>' is like Common Lisp's
> `funcallable-standard-class'. Likewise there is
> `<applicable-struct-with-setter-vtable>', which looks for the setter in
> the second slot. This needs to be better documented.
>
> For a not-very-simple example, see modules/oop/gooops.scm in Guile's source code.
> I don't know any simple examples.
>
> Greetings,
> Maxime.
--
repositories: https://notabug.org/ZelphirKaltstahl
prev parent reply other threads:[~2021-09-20 8:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 22:50 #:printer filed in language specification Justin Veilleux
2021-09-18 14:47 ` Maxime Devos
2021-09-18 15:24 ` Justin Veilleux
2021-09-19 12:11 ` Zelphir Kaltstahl
2021-09-19 12:24 ` Maxime Devos
2021-09-20 8:04 ` Zelphir Kaltstahl [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c4331b48-d541-431d-b59d-4e79d33f8ae4@posteo.de \
--to=zelphirkaltstahl@posteo.de \
--cc=guile-user@gnu.org \
--cc=maximedevos@telenet.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).