Re: [racket] keyword arguments in define-syntax-rule

2011-08-10 Thread Carl Eastlund
Keyword arguments in function headers and applications are constrained to take a single argument; macro patterns in syntax-case (which define-syntax-rule is based on) and syntax-parse are more flexible in how they can use keywords. Making them accept keyword arguments would remove this flexibility

Re: [racket] keyword arguments in define-syntax-rule

2011-08-10 Thread Matthew Flatt
At Wed, 10 Aug 2011 10:58:34 -0600, Jon Rafkind wrote: > Can `define-syntax-rule' support keyword arguments? Preferably keywords > with default values. > > (define-syntax-rule (foo #:x [x 5]) x) > (foo) > (foo #:x 2) > > If this sounds like a good idea and could be implemented I can give it a > w

[racket] keyword arguments in define-syntax-rule

2011-08-10 Thread Jon Rafkind
Can `define-syntax-rule' support keyword arguments? Preferably keywords with default values. (define-syntax-rule (foo #:x [x 5]) x) (foo) (foo #:x 2) If this sounds like a good idea and could be implemented I can give it a whirl. _ For list-relate