[plt-scheme] How to write context-aware macros?

From: Noel Welsh (noelwelsh at gmail.com)
Date: Fri Oct 23 06:52:23 EDT 2009

On Fri, Oct 23, 2009 at 6:52 AM, Simon Haines <con.amalgamate at gmail.com> wrote:
> I'd like some advice for implementing related macros that share some
> kind of context. The example I'd like to emulate is (in clojure):
> http://github.com/ragnard/redis-clojure/blob/master/examples/demo.clj

Probably the simplest way to do this is using syntax parameters. They
work just about the same as normal parameters.

Note that in the clojure example, only the redis/with-server form need
be a macro. The others could be implemented as normal functions if the
with-server form were to expand into a call to parameterize, for
example.

N.


Posted on the users mailing list.