Style Warnings - SBCL 1.0.31 User Manual
Description: SBCL 1.0.31 User Manual

Previous: Defining Constants, Up: Idiosyncrasies

#### 2.3.5 Style Warnings

SBCL gives style warnings about various kinds of perfectly legal code, e.g.

- `defmethod` without a preceding `defgeneric`;
- multiple `defun`s of the same symbol in different units;
- special variables not named in the conventional `*foo*` style, and lexical variables unconventionally named in the `*foo*` style

This causes friction with people who point out that other ways of organizing code (especially avoiding the use of `defgeneric`) are just as aesthetically stylish. However, these warnings should be read not as “warning, bad aesthetics detected, you have no style” but “warning, this style keeps the compiler from understanding the code as well as you might like.” That is, unless the compiler warns about such conditions, there's no way for the compiler to warn about some programming errors which would otherwise be easy to overlook. (Related bug: The warning about multiple `defun`s is pointlessly annoying when you compile and then load a function containing `defun` wrapped in `eval-when`, and ideally should be suppressed in that case, but still isn't as of SBCL 0.7.6.)