[plt-scheme] Unhygienic macro not needed?

From: Laurent (laurent.orseau at gmail.com)
Date: Fri Nov 20 11:25:37 EST 2009

On Fri, Nov 20, 2009 at 17:14, Carl Eastlund <carl.eastlund at gmail.com>wrote:

> On Fri, Nov 20, 2009 at 10:55 AM, Joe Marshall <jmarshall at alum.mit.edu>
> wrote:
> > On Fri, Nov 20, 2009 at 5:57 AM, Laurent <laurent.orseau at gmail.com>
> wrote:
> >>
> >> I have the following (simplified) code :
> >>
> >> (define (f1 x)
> >>   (let ([y (foo x)])
> >>     (bar x y y)
> >>     (plop y x y)
> >>     (baz x y)))
> >>
> >> (define (f2 x)
> >>   (let ([y (foo x)])
> >>     (baz x y)))
> >
> > (define (wrapper receiver)
> >  (lambda (x)
> >    (let ((y (foo x)))
> >      (receiver x y)
> >      (baz x y))))
> >
> > (define f1
> >   (wrapper
> >     (lambda (x y)
> >         (bar x y y)
> >         (plop y x y) )))
> >
> > (define f2
> >   (wrapper
> >      (lambda (x y) #f)))
>
> Oops.  Joe, of course, has the best solution.  No need for "macrology"
> when "functionality" does the job.  Pardon the puns.
>

But this introduces a (little?) run-time cost, doesn't it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20091120/8b13472f/attachment.html>

Posted on the users mailing list.