[alexandria-devel] sans-bind, or programmatic sharing of keyword arguments

Samium Gromoff _deepfire at feelingofgreen.ru
Sun Aug 5 23:30:18 UTC 2007


I've finally catched a recurrent thought in a material-enough state,
so i can get together enough mental energy to expand on it.

Suppose there are two functions (or macros), %A and A, and, as the
notation implies, %A is the lower-level implementing one.

Suppose that A is supposed to accept as-is a large part of the keyword
arguments %A accepts, and perhaps, accept several of its own, possibly
defaulting them to some values.

A straightforward implementation would be to accept the same keyword
arguments and then re-feed them literally, one by one, to %A.

That has obvious disadvantages, though.

So, what A could do, is to get &rest arglist, and process it programmatically,
by:
  - filtering out A-specific key-value pairs
  - binding them (and possibly defaulting)
  - yielding the A-specificity-free plist ready to be fed to APPLY #'%A (or to ,@),
    which is doable by ALEXANDRIA:SANS

What do you think, folks?

regards, Samium Gromoff



More information about the alexandria-devel mailing list