next up previous contents index
Next: Type Style Recommendations Up: More About Types in Previous: The Freeze-Type Declaration   Contents   Index


Type Restrictions

restrictions on

Avoid use of the and, not and satisfies types in declarations, since type inference has problems with them. When these types do appear in a declaration, they are still checked precisely, but the type information is of limited use to the compiler.and types are effective as long as the intersection can be canonicalized to a type that doesn't use and. For example:

(and fixnum unsigned-byte)
is fine, since it is the same as:
(integer 0 most-positive-fixnum)
but this type:
(and symbol (not (member :end)))
will not be fully understood by type interference since the and can't be removed by canonicalization.

Using any of these type specifiers in a type test with typep ortypecase is fine, since as tests, these types can be translated into the and macro, the not function or a call to the satisfies predicate.


next up previous contents index
Next: Type Style Recommendations Up: More About Types in Previous: The Freeze-Type Declaration   Contents   Index
Peter Van Eynde 2001-03-08