[plt-scheme] r6rs define-struct and gensym

From: Toon Verwaest (toon.verwaest at gmail.com)
Date: Wed Apr 1 17:01:51 EDT 2009

Just in case other people are wondering as well.

Gensym can still be loaded (although you might not want to do that 
anymore; and Chongkai was right in my case

#!r6rs
(library
 (Test)
 (export gensym)
 (import (rnrs)
         (only (scheme) gensym)
         (rnrs io ports))
 (display (gensym)))


Chongkai Zhu wrote:
> Toon Verwaest wrote:
>> Hi,
>>
>> I am trying to port an OO-lib I wrote in PLT, SchemeTalk 
>> (http://smallwiki.unibe.ch/SchemeTalk), to r6rs; I'm having some 
>> problems with trying to load gensym and define-struct.
>>
>> I have found define-struct in (scheme private old-ds); but I guess I 
>> should use something else in the future?
>>
>
> R6RS records: http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-7.html
>
>> And how can I include gensym? I don't directly find the exact package.
>>
>
> According to R6RS, "two symbols whose names are spelled the same way 
> are never distinguishable". So no gensym in the sense of uninterned 
> symbol is available. For the purpose of "generating something that is 
> distinct from anything else", use some other data type instead.
>
>> cheers,
>> Toon Verwaest
>
> Chongkai



Posted on the users mailing list.