Another declaration problem occasionally encountered is incorrect declarations on defmacro arguments. This probably usually happens when a function is converted into a macro. Although legal and well-defined Common Lisp, this meaning of this definition is almost certainly not what the writer intended. Because of macro semantics, it is hardly ever useful to declare the types of macro arguments. In this case, it would be stylistically preferable to change this macro back to a function and declare it inline.
Macros have no efficiency advantage over inline functions when using Python.
See section 5.8 . Some more subtle problems are caused by incorrect declarations that can't be detected at compile time. Although pos is almost always a fixnum , it is nil at the end of the loop. Because if you compile without type checks, the compiler just quietly believes the type declaration. Note that there is usually little performance penalty for weakening a declaration in this way.