Sorry, forgot to CC alexandria-devel
2010/4/5 Pascal J. Bourguignon pjb@informatimago.com
On 2010/04/05, at 18:55 , Nikodemus Siivola wrote:
macro WHICHEVER &rest possibilities
"Evaluates exactly one of POSSIBILITIES, chosen at random."
ONE-OF seems to be often used not name a similar function.
I understand the need for a macro version of the feature, but could we name it in a similar way?
Could we include the ONE-OF function too?
If we included a function named ONE-OF, perhaps we could name the macro EVAL-ONE-OF ? (think EVAL-WHEN, not EVAL).
As a functional version of *whichever *there is already *random-elt*. I can't think of an implementation of *one-of* that would not need to build a list at compile time, so the only difference between *one-of* and * random-elt* is if the construction is made explicitly by the user or implicitly.
As for the name, I believe *whichever** *is a good name and should not be changed.