On Sep 19, 2009, at 4:56 PM, David Van Horn wrote:

Suppose I define a cons-like structure and I want to provide a form that is like quote, but produces my cons-like things when it quotes syntactic pairs.

I presume this came up because you want to support quote-like thing for SRFI-101.

I suggest that you put quote in the spec, and in the reference implementation, you do:

(import (only (srfi :100 implementation-specific) imp:quote))

(define-syntax quote
  (syntax-rules ()
    [(_ x) (imp:quote x ra:cons)]))

and then provide a portable reference implementation of imp:quote that does not meet the O(1) time requirement, and leave it to implementations to plug their own (srfi :100 implementation-specific) library that does provide the O(1) requirement. The record types for kons and node definitely have to be nongenerative if you want to support quote and separate compilation, otherwise, the quoted constants would have a different "type" from runtime constants, which is not cool.

Aziz,,,

Reply via email to