Peter Bex wrote: > On Wed, Jul 24, 2019 at 03:49:13PM +0200, Marco Maggi wrote: >> Ciao,
>> I know that it is dirty, but is it possible to retrieve the symbol >> name of a structure from the block object? If I create a structure >> with: >> (define (make-it) >> (##sys#make-structure 'spiffy)) >> (define O >> (make-it)) >> can I extract "spiffy" from the structure object bound to "O"? I >> searched "library.scm" in CHICKEN's 5.1.0 source without success. > You can access slot 0 to get it: > (##sys#slot (##sys#make-structure 'foo) 0) => foo Yes! Damn, I already knew about it... > And it will be namespaced with the module if it is defined in a module. Mh. If I understand correctly this is to avoid collisions for the record printers, and stuff like that. If I define my own record-type constructor, and I want to use the built-in record printers facilities: is CHICKEN expecting me to qualify the name with the module? The symbols I want to use are expected to be unique... Thanks. -- Marco Maggi _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users