[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quoted data in macro expansion

This page is part of the web mail archives of SRFI 72 from before July 7th, 2015. The new archives for SRFI 72 contain all messages, not just those from before July 7th, 2015.

 Per Bothner wrote:
 > Am I correct in understanding that any quoted S-expressions, in either a 
 > macro "parameter" or in a template, is copied? 
 You are.  
 > I don't know if this is a big deal, but it breaks pair identity in cases 
 > where it is preserved in existing implementations.  This seems to make 
 > SRFI-72 essentially incompatible with SRFI-38, in the sense that you 
 > can't use of SRFI-38 shared structure in programs (though it is still 
 > available for external data).  And of course cycles are prohibited.
 Good point.  I assume you mean expressions like
   (define ones (quote #0=(1 . #0#)))
 The procedures that would have to be changed to support this are the 
 current implementations of datum->syntax and syntax->datum, essentially 
 lifting the algorithm of SRFI-38 in the way you suggest.