[racket-dev] check-match?

From: David Van Horn (dvanhorn at ccs.neu.edu)
Date: Mon Nov 19 20:25:29 EST 2012

On 11/19/12 8:20 PM, Joe Gibbs Politz wrote:
>  > Yeah, that is very nice! (It should begin with "check" not "test"
> tho, right?)
> Indeed; Jonah was writing w.r.t plai, which uses test.  Should use
> check- in rackunit.
> I noticed that this also violates, from the rackunit docs:
> "Although checks are implemented as macros, which is necessary to grab
> source location, they are conceptually functions. This means, for
> instance, checks always evaluate their arguments."
> I suppose this should go in a separate section of "additional checks" or
> some such?

Maybe the right thing to do is make it lightweight to write predicates 
with match so that you don't even need a separate testing form?

Something like (? P) => (lambda (x) (match x [P true] [_ false]))


Posted on the dev mailing list.