[racket] Thoughts on Overeasy

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Mon Aug 29 11:42:24 EDT 2011

Noel Welsh wrote at 08/29/2011 10:59 AM:
> I think core of my beef with keyword args in Overeasy is that they
> don't compose. For example, if you give all of setup, teardown, and
> around keyword args, in what order are they applied? I.e. if I specify
> both setup and around, which runs first? I prefer writing an
> expression, as this makes it explicit and obvious what is going on.

I think I suggested only "#:setup" and "#:teardown".  The order is easy 
to define. :)  And I don't think they need to compose.  If someone needs 
something fancier, they do it the Racket way, not the Overeasy sugar way.

> I
> don't like the use of keyword arguments for the other parameters for
> similar reasons. I think they can all be replaced with library
> procedures. E.g.
>   (with-output name expr)
> to capture current-output-port.

The documentation gives the scenarios of a test case catching outputs in 
these two cases:

(test (let ((o (open-output-string)))
        (display 'a o) (display 'b) (display 'c o)
        (get-output-string o))

    (test (begin (fprintf (current-error-port)

In neither case (missing argument in new code, unexpected diagnostic 
message in legacy code) did the test writer expect output.

How does this fit with "with-output"?

Also, maybe it's time for me to find all the unit tests in PLaneT, and 
see what all we actually need to support so far.


Posted on the users mailing list.