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

From: Robby Findler (robby at cs.uchicago.edu)
Date: Wed Jun 13 10:08:47 EDT 2007

On 6/13/07, Eli Barzilay <eli at barzilay.org> wrote:
> On Jun 13, Robby Findler wrote:
> > On 6/12/07, Eli Barzilay <eli at barzilay.org> wrote:
> > > On Jun 12, Robby Findler wrote:
> > > > Here's another question (which I think your macro expansion
> > > > message may have answered implicitly, I'm not sure): what
> > > > happens when I do something like this:
> > > >
> > > >   (lambda args (printf "~s\n" args) (apply f args))
> > > >
> > > > [...]
> > >
> > > You won't be able to see them -- and the problem that I'm talking
> > > about is that you won't be able to accept them.  This procedure
> > > will simply barf if given keyword arguments.  (At least IIUC, and
> > > I think I do...)  The bottom line is that this procedure is
> > > sort-of like a traced `f' except that it does not accept keyword
> > > arguments at all.  (More in a separate message.)
> > >
> >
> > You and Matthew seem to be in direct contradiction on this point.
>
> If you remember, the problem started with
>
>   f == (lambda xs (apply f xs))
>
> not being true for keyworded arguments.  The rest argument does not
> have the keyword information -- unlike the current situation with
> "kw.ss".
>
> As Matthew mentioned later, you will need an explicit
> `make-keyword-procedure' to access the keywords -- without that, you
> will not be able to see them, and because you have a non-keyword
> procedure, calling it with keywords is an arity error.

I thought we moved on and are now considering keyword procedures that
must have a default (altho the default might be to signal an error).

Robby


Posted on the users mailing list.