> My gut feeling is that the values for these keys should be evaluated at
 > declaration, although so far I haven't been able to come up with any
 > example where this is really needed. Anyway, if the declaration-time
 > expansion is done as
 >   \edef\name@value{<default>}

i have my doubts that there should be any unprotected edefs anywhere if you
can't really control the contents. but the there is perhaps an argument for
general declaration time evaluation. then perhaps there isn't, it would really
help to get some arguments (in terms of examples) why this is helpful.

right now we have

 - no evaluation for functions, names (with the exception that \MultiSelection
   is evaluated but this can be viewed as part of the snytax spec rather than
   an evaluation)
 - evaluation for lengths and counters

which is sort of reasonable i think, or not?

 > A comparison with fontinst might also be useful here. Although I don't
 > think it is spelt out like this anywhere, fontinst makes a distinction
 > between string variables (the values of which are fully evaluated/expanded
 > when they are assigned) and command variables (where no expansion takes
 > place until they are used). Thus what I'm suggesting is that `n' type keys
 > should work like string variables, whereas `f<n>' type keys should work
 > like command variables.

that would be an alternative, but again I would like to see at least a single
example why one would need/want expansion (beside gut feeling, though the
latter might be useful)

 > [1] About xinitials: The problem with that is of course not in the
 > template, but in the document command which passes general text to an
 > argument which expects a name value. The right thing to do would be to
 > mangle the argument into a working name before trying to use it as an
 > instance name. (A sketch for a mangling procedure would be the following:
 > Require that the text to mangle is robust and doesn't contain any TeX
 > primitives. Define representations for the text commands. Throw away all
 > commands which aren't text commands---making \protect temporarily \@gobble
 > should take care of that. Besides that something needs to be done about the
 > \chardef tokens \% and \&; making them proper text commands is probably the
 > way to go.)

right on all accounts. a general function for doing this, eg taking some
tex/text input and making a csname acceptable "name" out of it would be
helpful on many occasions.