define-syntax

2008-12-09 Thread Pach Roman (DGS-EC/ESG3)
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 "

Re: Guile release planning

2008-12-09 Thread Ludovic Courtès
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

Re: define-syntax

2008-12-09 Thread Neil Jerram
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

AW: define-syntax

2008-12-09 Thread Pach Roman (DGS-EC/ESG3)
>> 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)

Re: define-syntax

2008-12-09 Thread Neil Jerram
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

Re: AW: define-syntax

2008-12-09 Thread Clinton Ebadi
"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