I read in the Google Common Lisp Style Guide (see the last section) that there is an error in Common Lisp, the standard is relative to and as a type specifier. Namely, that this is not a βshort circuitβ or equivalent, that the evaluation order is not guaranteed, contrary to what is assumed in the example :
(and integer (satisfies evenp))
However, looking at section 4.4 of CLtL2, he stated that
When typep processes the and type specifier, it always checks each of the component types in order from left to right and stops processing as soon as it finds one intersection component to which the given object does not belong.
This section further explains that this is so as to allow satisfies to be filtered by another type, to avoid errors.
Can we safely assume that this is a mistake in the Google Style Guide or the behavior has changed with CLtL2?
types lisp common-lisp cltl2
user1220978
source share