[plt-scheme] keyword arguments (in v4.0, maybe)

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Jun 12 17:18:59 EDT 2007

At Tue, 12 Jun 2007 13:46:04 -0400 (EDT), Dimitris Vyzovitis wrote:
> On Tue, 12 Jun 2007, Eli Barzilay wrote:
> 
> > On Jun 12, Matthew Flatt wrote:
> > >
> > > So probably `procedure?' should return #f for things that are like
> > > procedures, but that require some keyword (as opposed to things that
> > > work like procedures and accept keyword-based arguments, but all the
> > > keyword arguments all optional). Then, the above remains true for
> > > procedures.
> > >
> > > Meanwhile, it's true that there's a kind of infection to the design,
> > > in that many tools and libraries should be made to work with both
> > > procedures and keyword-requiring things. But maybe working only for
> > > procedures (that don't require any keywords) is a reasonable
> > > specification for other tools and libraries.
> > >
> > > What examples do we have, other than `trace'?
> >
> > I grepped the PLT tree for other examples.  This is a summary of
> > things I found.  (Some of these don't apply, some might apply in the
> > future.  I'm just trying to provide a quick overview, not a proper
> > analysis.)
> > ...
> 
> All this sounds incredibly complicated and major code breakage inducing.
> What's wrong with paying a price for keywords that need it dynamically?
> Why not work on refining the  kw lib to be more efficient (perhaps
> use a parameter) instead?

Efficiency is not the motivation. My original message had an offhand
comment about efficiency on line 86, but the preceding 85 lines were
about how I think that our current keyword arguments are confusing
enough to prevent their wider use.

Matthew



Posted on the users mailing list.