Make all (most) predicates total
In particular, exact? and inexact? should be total. For example, it's confusing that
(integer? 3.0) ;=> #t
(integer? "3.0") ;=> #t
(exact? 3.0) ;=> #f
(exact? "3.0") ; ==> <error> but it should be #f
But I think it would be bad in some cases, for example port-closed?. I'm not sure what is the rule that I want. Perhaps skip the change in the predicates that look like a field in a struct, or the predicates that may change.
Slightly related to https://github.com/racket/rhombus-brainstorming/issues/52 "Change integer? to mean exact-integer?".
Strongly agreed. I've been using this pattern in all of the Rebellion APIs and it makes both documentation signatures and contracts significantly more readable.
A best practice I've settled on is giving total predicates names that fit the format of {adjective}-{noun}?. So instead of a partial predicate named port-closed?, I'd recommend a total predicate named closed-port?.