[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Applying functions to all the symbols in a package...



Back when the initial design was being done, we explicitly considered
whether to go with MAP-SYMBOLS or DO-SYMBOLS.  At the time, it seemed
that most of us had the opposite religion from Mr. Miller.  Most of us
favored the iterative form, and I don't remember anyone arguing for the
mapping form.  A practical argument is that DO-SYMBOLS typically is used
in situations where there are a LOT of symbols must be processed, and in
the absence of a very clever compiler the MAP form would be slower due
to the need for explicitly calling the supplied functional argument.

I don't think that it would be worthwhile to include both forms just to
accommodate both stylistic preferences.  These facilities are not used
often, so the occasional use of a less-favored style should not be a big
hardship for anyone.  And, of course, fanatical DO-haters can write a
MAP-SYMBOLS macro easily enough, and not have to worry about what it
expands into.

-- Scott