[plt-scheme] Help with understanding how to reuse macro data

From: Jakub Piotr Cłapa (jpc-ml at zenburn.net)
Date: Fri Jan 2 18:48:27 EST 2009

On 1/2/09 11:18 PM, Joe Marshall wrote:
> On Fri, Jan 2, 2009 at 2:10 PM, Grant Rettke<grettke at acm.org>  wrote:
>> This seems ok because the data specification is static. I only thought
>> about this just now, so I didn't dig any deeper yet. Is this a
>> reasonable approach? If so, what is the best way to approach it?
>> What is the right/idiomatic solution here? Or is this bad idea?
> Just my 2 cents.
> Use a function rather than a macro.
> Macros are a great tool for syntactic abstraction, but you aren't
> doing that.

AFAIK just use define instead of define-syntax. syntax-case returns a 
normal function so this should work (maybe with some syntax->datum on 
the result). Or use match-lambda instead of syntax-case.

Jakub Piotr Cłapa

Posted on the users mailing list.