Annoying warning for ETYPECASE
|Reported by:||heller||Owned by:||somebody|
In code like this:
(defun foo (x) (etypecase x (number 1) (t 2)))
CMUCL produces this Warning: Bad style to use T or OTHERWISE in ECASE or CCASE
This is annoying for several reasons:
- The warning is confusing because there's neither an ECASE nor an CCASE involved.
- T is a perfectly good type specifier and the compiler will warn about unreachable code anyway.
- Arguably it's stylistically better to use ETYPECASE instead of TYPECASE whenever possible, but this warning pretty much encourages TYPECASE.
- Even for ECASE and CCASE I don't see anything wrong with using T as key.
In summary, I suggest to remove the warning for ETYPECASE altogether and if you really want to keep it for ECASE then at least make it a STYLE-WARNING instead of a WARNING.