From: Juho S. <js...@ik...> - 2007-06-17 23:38:15
|
"karol skocik" <kar...@gm...> writes: > Hi, > can anybody tell me why code like this emits style warning? > > (let ((x (random 3))) > (format t "x = ~a~%" x) > (ecase x > ((or 0 1) :small) > ((or 2 3) :big))) [...] > I use variant of this code (with symbols). I know that the warning is > because repeated (or val val ..), but from the coding style point of > view, I can't see anything wrong with it. Does anybody have some > explanation why is this not recommended? Someone who gets into the habit of inserting those spurious ors into the case keys will get bitten the moment the symbol OR becomes a possible value for the keyform. Just like people who get into the habit of writing (case x ('a ...) ('b ...)) will be very confused when QUOTE matches the 'A clause. -- Juho Snellman |