[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] retrieving a structure's symbol name
From: |
Peter Bex |
Subject: |
Re: [Chicken-users] retrieving a structure's symbol name |
Date: |
Thu, 25 Jul 2019 08:49:19 +0200 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Thu, Jul 25, 2019 at 07:36:04AM +0200, Marco Maggi wrote:
> I am writing a library that mimics R6RS records. Every R6RS record-type
> can be associated to a unique identifier (UID), which is a symbol.
> Defining the same record-type in multiple modules is fine, under the
> correct conditions.
>
> Using the UID as struct type name, and so implementing records as
> simple CHICKEN structs, seems an efficient way to do it.
I had a quick look at the R6RS page and god that shit is ugly :)
But you're right, using these low-level constructors seems the best way
to do this. Maybe you can use gensyms or uuids for the record names.
uuids probably work better if you later want to generate a types database
for the library.
Cheers,
Peter
signature.asc
Description: PGP signature