[racket] Simplifying keyword arguments

From: Laurent (laurent.orseau at gmail.com)
Date: Wed Jul 21 11:32:48 EDT 2010

Hi,

When using keyword arguments, I often write:
(define (foo #:some-arg some-arg) .... )
or:
(define (foo #:some-arg [some-arg a-value]) .... )

This redundancy between the keyword name and the argument name bothers me a
little each time I use it.

Would it be wrong to simplify this to:
(define (foo #:some-arg)
  ....
  (list some-arg)
)
and
(define (foo [#:some-arg a-value])
  ....
  (list some-arg)
  )

where the `some-arg' definitions are automatically made out of the keyword
name?
Or maybe I'm just missing the point here. If so please enlighten me.

Thanks,
Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100721/dc5db134/attachment.html>

Posted on the users mailing list.