[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #:printer filed in language specification.

From: Maxime Devos
Subject: Re: #:printer filed in language specification.
Date: Sun, 19 Sep 2021 14:24:37 +0200
User-agent: Evolution 3.34.2

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 
I don't know any simple examples.


Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]