Re: SRFI 284: define-typed Dr. Arne Babenhauserheide 27 Sep 2026 11:11 UTC
Artyom Bologov <xxxxxx@aartaka.me> writes:

>> sph-sc style is supported by the implementation, but not part of the
>> SRFI. While I like it, and while it might enable rest arguments (though
>> my experiment with implementing them failed today), it is also more
>> error-prone.
>
> I see. Is there an extension space in the SRFI that’d accommodate that
> syntax?

Not yet. Do you think that would be a good idea?

It’s currently not yet as general as the -> syntax, but maybe a similar
approach could work:

(define-typed (f a) (ret? arg?) a)
(define-typed (f a) ((-> ret-list?) arg?) (values a))
(define-typed (f a) ((-> ret? ret?) arg?) (values a a))

This should be full-featured and the simple format would match the
sph-sc style.

(I added sph-mn to CC, because this may be interesting)

Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
https://www.draketo.de