Skip to content

Support SRFI 273 return checks in SRFI 253#1273

Open
aartaka wants to merge 1 commit into
shirok:masterfrom
aartaka:srfi-253-273
Open

Support SRFI 273 return checks in SRFI 253#1273
aartaka wants to merge 1 commit into
shirok:masterfrom
aartaka:srfi-253-273

Conversation

@aartaka

@aartaka aartaka commented May 24, 2026

Copy link
Copy Markdown

Hello and thanks for integrating SRFI 253 into Gauche! I’ve made a follow-up SRFI to 253, SRFI 273. In it, one significant addition is procedure return type checks. In this PR, I’ve implemented it, cleaning up the code in the process.


Another significant addition that’s likely to persist in SRFI 273 up to finalization is check-impl? auxiliary syntax. In short, it might allow providing implementation-specific types if standard predicates don’t fit the data. Something like

(check-arg (check-impl? <fixnum>) 3)
(define-checked (a [b (check-impl? <short>)] [c (check-impl? <short>)])
  (+ b c))
;; etc.

I’m not sure how to implement this one. It seems like check-arg is the most intuitive place to implement that, but I don’t want to pollute this generic macro with such specific details. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant