2 ms·
We should strive to name predicate functions using adjectives or verb participles. Then they do not require a suffix. (if (closed handle) ...) (when (sta
by kazinator 7y ago
We should strive to name predicate functions using adjectives or verb participles. Then they do not require a suffix.
(if (closed handle) ...)
(when (static widget) ...)
The p or -p or ? should only be used in situations when we can't avoid naming the predicate after a noun, like stringp for "is it a string".
- Smithalicious 7y agoI don't like this since I prefer using adjective for conversions/casts, i.e. I'd like (int x) to mean "x considered as integer". If you mix the two conventions (like you seem to suggest with your last paragraph) then it just becomes ambiguous.
- kazinator 7y agoint is an adjective?