[plt-scheme] Keyword argument refactoring comments

From: Noel Welsh (noelwelsh at gmail.com)
Date: Fri Jul 25 16:58:59 EDT 2008

On Fri, Jul 25, 2008 at 5:59 PM, Grant Rettke <grettke at acm.org> wrote:

> Did you ever find places where you thought keywords would be great,
> but then turned out to be a bad idea?

There is a tension between optional and keyword arguments.  Keyword
arguments are harder to remember, and longer to write out.  Optional
arguments don't scale, in that you have to specify all preceding
arguments to the one you want.  I sometimes find myself writing a
function with optional arguments, and later converting it to keyword
arguments or mixing the two, which is a bit uncomfortable.  Generally
keyword args are great, but as all things in writing code there are
tradeoffs to be made.

N.


Posted on the users mailing list.