[racket] Thoughts on Overeasy

From: Eli Barzilay (eli at barzilay.org)
Date: Mon Aug 29 04:04:16 EDT 2011

10 hours ago, Matthias Felleisen wrote:
> On Aug 28, 2011, at 1:02 AM, Eli Barzilay wrote:
> > I don't see what's wrong with using `dynamic-wind' directly:
> > 
> >  (dynamic-wind setup
> >                (λ () (test ...))
> >                teardown)
> > It has a huge advantage of already being there, separate from the the
> > testing facility, and I didn't see any use that needs something
> > special.
> The Java people argue so too and force people to use the command
> pattern for all exn-triggering tests. Isn't the sheer presence of a
> macro system an indication that Racketeers don't want this kind of
> syntactic repetition? See the future-lambda email thread for the
> same idea.

It is -- I completely agree that there's a valid point in having
implicit thunks in `dynamic-wind' as well as in `future', `thread',
`with-output-to-file', and a bunch more.  I also dislike the
`dynamic-wind' name since it smells of implementation details.  Even
more, I can see a point in a more generic form that will also allow
you to forbid reentry to the body (as with Dorai's post on the
subject) and possibly more extensions.

But all of that is unrelated to *testing*.  By keeping things
separate: not implementing such a form in a testing framework and
referring people to the language for such things, you get more focused
work, and if the language gets a better replacement form, then your
testing library gets that too.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.