[plt-scheme] getting the constructor from a struct-type

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Thu Feb 16 22:41:27 EST 2006

On Thu, 2006-02-16 at 19:08 -0700, Matthew Flatt wrote:
> I finally got a chance to look into this.
> As far as I can remember, `struct-type-info' was meant to provide
> information for inspecting/adjusting an existing structure, and that's
> why the predicate and constructor were left out. In particular,
> `struct-type-info' was added at the same time that `struct-ref' and
> `struct-set!' were removed.
> I'll add `struct-type-make-constructor' and
> `struct-type-make-predicate' in the next version. (The "make" in the
> name indicates that a new constructor/predicate will be created each
> time.)


I'm curious about two things:  first, might it be reasonable to extend
the struct-type to contain the predicate and constructor, as it
currently does for the accesssor etc?  Second, did the code I wrote,
which calls, either scheme_make_struct_instance or
scheme_make_struct_values, properly respect inspectors?  Can you get
around inspectors w/ the ffi?

Thanks again,

sam th

Posted on the users mailing list.