Email list hosting service & mailing list manager


Re: Questions, loose ends, misprints, etc. David Van Horn 03 Dec 2005 15:50 UTC

Matthew Flatt wrote:
> At Fri, 2 Dec 2005 08:01:48 -0500 (EST), Andre van Tonder wrote:
>>On Thu, 1 Dec 2005, Matthew Flatt wrote:
>>>Andre wrote:
>>>>- Can I export an unbound identifier?  For example, can I export
>>>>  literals (such as ELSE, UNQUOTE, etc.), or does this not even make
>>>>  sense.
>>>
>>>This doesn't make sense to me, at least. What would it mean?
>>
>>Another example would be SRFI-76 R6RS records, where the <record name> might
>>not necessarily be bound to anything but should be exportable so clients can write:
>>
>>(type-descriptor <record name>) (syntax)
>
> It seems to me that the <record name> should be bound --- though
> perhaps to a macro that rejects all attempts to use <record name>
> directly.

I can imagine an implementation that doesn't bind <record name> at all,
but rather extends the type-descriptor syntax to match a literal <record
name>, ie,

(define-syntax type-descriptor
  (syntax-rules (<record-name>)
     ((type-descriptor <record-name>) ,,,)))

But, I think that just brings us back to Andre's original question about
exporting the names of literals.

David