Fw: Macro Question

Joseph Donaldson <[email protected]>
Newsgroups gmane.lisp.scheme.bigloo
Message-ID <[email protected]>

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.