I've performed following two short tests.
test 1:
---
(use-syntax (ice-9 syncase))
(define-syntax my-macro-1
(syntax-rules ()
((_ par1 par2 par3)
(begin
(string-concatenate (list par1 par2 par3))
(define (dummy)
(my-macro-1 "a" "b" "c"))
(format #t "
Hi Neil!
"Neil Jerram" <[EMAIL PROTECTED]> writes:
> OK, it's clear the consensus on 1.8.x is against my suggestion, so
> I'll accept that. And I can understand the reasons too. I think
> perhaps it comes down to Ludovic's point about the version number
> being a hint - i.e. people already have
2008/12/9 Pach Roman (DGS-EC/ESG3) <[EMAIL PROTECTED]>:
> I've performed following two short tests.
>
> test 1:
> ---
>
> (use-syntax (ice-9 syncase))
>
> (define-syntax my-macro-1
> (syntax-rules ()
> ((_ par1 par2 par3)
> (begin
>(string-concatenate (list par1 par2 par3
>> I've performed following two short tests.
>>
>> test 1:
>> ---
>>
>> (use-syntax (ice-9 syncase))
>>
>> (define-syntax my-macro-1
>> (syntax-rules ()
>> ((_ par1 par2 par3)
>> (begin
>>(string-concatenate (list par1 par2 par3))
>>
>>
>> (define (dummy)
2008/12/9 Pach Roman (DGS-EC/ESG3) <[EMAIL PROTECTED]>:
>
> take look at the results
>
> (1) dummy => (lambda () (string-concatenate (list "a" "b" "c")))
> (2) dummy => (lambda () "abc")
>
> in the case of define-syntax (1) the string "abc" will be computed at
> the run time,
> the macro version (2
"Pach Roman (DGS-EC/ESG3)" <[EMAIL PROTECTED]> writes:
>>> test 2:
>>> ---
>>> (define-macro (my-macro-2 par1 par2 par3)
>>> (string-concatenate (list par1 par2 par3)))
A macro defined with define-macro is merely a function that is run at
macroexpansion time and is expected to return a new