[plt-scheme] passing-on keyword arguments

From: Dimitris Vyzovitis (vyzo at media.mit.edu)
Date: Tue Mar 18 19:21:06 EDT 2008

On Wed, 19 Mar 2008, [UTF-8] Jakub Piotr CÅ‚apa wrote:

> Eli Barzilay wrote:
> >   (define outer
> >     (make-keyword-procedure
> >      (lambda (kws vals . args)
> >        (+ (keyword-apply inner kws vals args) 5))))
> >
> > I think that I know how to make it easier, allowing something like
> > this:
> >
> >   (define (outer args ...)
> >     (+ (inner args ...) 5))
> >
> > to do the same, but it'll take some work to implement.
>
> OTOH you loose all the information on what are the arguments to both
> inner and outer. Sooner than you think you got those Python *args,
> **kwargs functions all over the place and runtime/editor documentation &
> reflection are worth nothing.

They are worth something: they are not a pain in the neck to use with
composition...

-- vyzo



Posted on the users mailing list.