Potential erratum: Domain of exact-integer?

5 views
Skip to first unread message

Daphne Preston-Kendal

unread,
May 7, 2025, 9:38:17 AMMay 7
to scheme-re...@googlegroups.com
See <https://codeberg.org/scheme/r7rs/issues/234>.

Should the header line of the entry for exact-integer? in R7RS small read (exact-integer? OBJ) rather than (exact-integer? Z) ?

That would seem to fit its intended purpose better: <https://small.r7rs.org/ticket/66/>
exact-integer? which returns #f on non-number objects can be more efficient than one which, in a strict error-checking implementation, would raise an exception.

A quick survey of R7-small implementations shows that at least Chibi, Gambit, Guile, MIT/GNU, and Sagittarius all return #f on (exact-integer? 'foo).


Daphne

Alex Shinn

unread,
May 7, 2025, 10:28:16 PMMay 7
to scheme-re...@googlegroups.com
I agree that extending the domain to OBJ makes more sense and is preferred for future standards.

It's backwards compatible for programs, but we'd have to be absolutely sure there are no implementations which take the stricter interpretation if we wanted to make this change.

--
Alex

--
You received this message because you are subscribed to the Google Groups "scheme-reports-wg1" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scheme-reports-...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/scheme-reports-wg1/731C6725-BEEC-4BC1-947F-68151F143983%40nonceword.org.

John Cowan

unread,
May 12, 2025, 4:06:21 PMMay 12
to scheme-re...@googlegroups.com
I don't understand whether this proposal was for R7RS-small or -large. I would be opposed to changing the small language at this point, but in favor of extending the large language to accept arbitrary objects for all numeric type predicates, not just exact-integer?, per my earlier message. This would be a backward compatible change.

Daphne Preston-Kendal

unread,
May 13, 2025, 3:26:08 AMMay 13
to scheme-re...@googlegroups.com
Brad Lucier tried to reply to this email, but he’s having trouble posting to the list. I don’t know who has administrative access who could help him.

Here is what he wanted to post:



On 5/7/25 09:37, Daphne Preston-Kendal wrote:
> Should the header line of the entry for exact-integer? in R7RS small read (exact-integer? OBJ) rather than (exact-integer? Z) ?

Yes.

Reply all
Reply to author
Forward
0 new messages