Sent from Yahoo Mail on Android 
 
  On Sat, Dec 31, 2016 at 10:32 AM, Joseph Donaldson<[email protected]> 
wrote:   Hello,
I have recently seen an interesting expansion of a syntax-rules macro whose 
definition contained a reference to a expansition-style macro, specifically an 
instantiate macro introduced by the object system. Here is a simplified example:
 (define-class foo
   a)

(define-syntax darn
   (syntax-rules ()
      ((_)
       (let ((a 1))
          (instantiate::foo (a a))))))

(darn)
Unexpectedly, at least to me, this expands to:
(let ((a1019 1))   (instantiate::foo (a1019 a1019)))
This results in an error because foo does not have a field named a1019. 
Contrary to my expectations, is the expected behavior?
Thanks, 
Joe
  

Reply via email to