[alexandria-devel] sans-bind, or programmatic sharing of keyword arguments
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
At Mon, 06 Aug 2007 03:30:18 +0400, Samium Gromoff wrote: [snip]
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?
Sorry for leaving too much of the context out. My actual proposal is to include in ALEXANDRIA a binding construct which would implement this pattern.
regards, Samium Gromoff
On 8/6/07, Samium Gromoff <_deepfire@feelingofgreen.ru> wrote:
My actual proposal is to include in ALEXANDRIA a binding construct which would implement this pattern.
Write it and submit a patch. I didn't really follow your explanation, so I can't say if I think it's appropriate. Cheers, -- Nikodemus
participants (2)
-
Nikodemus Siivola
-
Samium Gromoff