[plt-scheme] Another macro venture

From: Blake McBride (blake at mcbride.name)
Date: Sat Sep 9 13:36:01 EDT 2006

At 12:13 PM 9/9/2006, Eli Barzilay wrote:
>On Sep  9, Blake McBride wrote:
> > At 11:41 AM 9/9/2006, Eli Barzilay wrote:
> > >On Sep  9, Blake McBride wrote:
> > > > [...]
> > > > Again, all this is trivial to express in a lisp-like macro
> > > > system and the few capture situations are easy to avoid with a
> > > > little care.
> > >
> > >Note that even in CL:
> > >
> > >   (let ((a 1)) (set 'a 3) a) => 1
> > >
> > >in MzScheme terms, such a `set' would only change bindings in the
> > >current namespace, which makes it close to useless.
> >
> > I understand.  However, creating the set I seek will give me an
> > easy example of evaluating one additional level higher from
> > my previous macro difficulty.
>
>I don't think so -- I suspect that this macro is as simple as
>
>   (define-syntax set
>     (syntax-rules ()
>       [(set where what)
>        (namespace-set-variable-value! where what)]))
>
>which is even simpler than that:
>
>   (define set namespace-set-variable-value!)
>
>--

I appreciate the help but your suggestions kind of defeat my purposes.
First, I'm trying to stick with standard scheme.  Second, I'm trying to get
a handle on syntax-case.  A solution to my unmolested and unqualified
problem would be a big help and greatly appreciated.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20060909/cea64937/attachment.html>

Posted on the users mailing list.