Hi there,
Am wondering what the rationale is for choosing to define these new preds as true only for *fixed precision* integers?
`integer?` is true for any integer type (including BigInt, BigInteger).
`int?` is currently true only for fixed precision integers.
So `(pos-int? 4N)` is currently `false`.
My understanding is that the new preds (pos-int?, neg-int?, nat-int?, etc.) are being added to core largely for the convenience of clojure.spec?
If that's correct, I'd suggest that defining `pos-int?` and co. to support the usual arb precision integers would be more useful and less surprising.
Three options as I see them:
1. Keep the current definitions, and surprise/inconvenience folks who want to support big integers (quite common in my experience).
2. Switch the definitions to include big integers, and inconvenience folks who might want to specifically check for *fixed precision* integers (rare in my experience).
3. Offer an equivalent set of preds: `pos-integer?`, `neg-integer?`, `nat-integer?` (excessive IMO, and possibly also confusing).
So I'm advocating for option 2.
If you require further philosophical motivations-
These preds are inevitably going to get used often for specs. Most/many Clojure functions (in core and libs) that deal with integers tend to support arb precision ints, a useful feature. Which means that specs are going to be written (esp. by beginners) that unintentionally exclude arb precision support.
Conversely: those that have requirements to specifically *exclude* arb precision ints, are probably more sophisticated users and thus better able to understand when/where they may need to provide this additional spec info to exclude arb precision ints.
For example, it'd be easy enough to write a `fixed-precision?` pred that composes with `pos-int?` and co.
Much thanks for taking the time to consider this!
Cheers :-)