You can now[1] refer to a parameter by multiple names: def foo(a/b)
(cons a b)
(foo 3) ; => (3 . 3)
Why's this useful? It allows me to connect up params with different keyword args. For example, my old test has weird param names because I want to say things like ":valueof (+ 1 1) :should be 2": def test(msg valueof should expected)
if (valueof should expected)
...
Now I can say instead: def test(msg expr/valueof pred/should expected)
if (pred expr expected)
...
---Racket supports keyword args[2], and it lets you name your keyword args separately, but you're forced to provide their name even if it's the same: > (define (foo #:a a) a)
> (foo #:a 3)
3
Wart, on the other hand, only requires the name of the keyword when it's different from the param.--- [1] http://github.com/akkartik/wart/tree/fd54da7e80 $ git clone http://github.com/akkartik/wart.git
$ cd wart
$ git checkout fd54da7e80
$ wart
[2] http://arclanguage.org/item?id=12591, http://lambda-the-ultimate.org/node/4221 |