|
Type declarations for SRFIs?
Artyom Bologov
(05 Aug 2026 12:14 UTC)
|
|
Re: Type declarations for SRFIs?
Peter Bex
(05 Aug 2026 12:24 UTC)
|
|
Re: Type declarations for SRFIs? Artyom Bologov (05 Aug 2026 13:04 UTC)
|
|
Re: Type declarations for SRFIs?
Wolfgang Corcoran-Mathe
(05 Aug 2026 16:20 UTC)
|
|
Re: Type declarations for SRFIs?
Wolfgang Corcoran-Mathe
(05 Aug 2026 15:58 UTC)
|
|
Re: Type declarations for SRFIs?
Artyom Bologov
(05 Aug 2026 18:56 UTC)
|
|
Re: Type declarations for SRFIs?
Philip McGrath
(06 Aug 2026 00:55 UTC)
|
|
Re: Type declarations for SRFIs?
Wolfgang Corcoran-Mathe
(06 Aug 2026 20:26 UTC)
|
|
Re: Type declarations for SRFIs?
Arthur A. Gleckler
(06 Aug 2026 21:07 UTC)
|
|
Re: Type declarations for SRFIs?
Artyom Bologov
(06 Aug 2026 22:28 UTC)
|
|
Re: Type declarations for SRFIs?
Artyom Bologov
(06 Sep 2026 11:06 UTC)
|
|
Re: Type declarations for SRFIs?
Arthur A. Gleckler
(06 Sep 2026 17:57 UTC)
|
|
Re: Type declarations for SRFIs?
Artyom Bologov
(06 Sep 2026 18:47 UTC)
|
|
Re: Type declarations for SRFIs?
Arthur A. Gleckler
(06 Sep 2026 21:41 UTC)
|
Hi Peter, > I don't know - those SRFIs seem overly dynamic, using things like > predicates and disjoin/union. The CHICKEN type system is a lot simpler. Predicates can easily be converted into more exact types whenever necessary. It’s already done in SRFI 253 implementations for CHICKEN and Kawa (the only implementations that provide strict types that I can get my hands on, besides Gambit.) > For most SRFIs packaged as CHICKEN eggs we already define some types, > but it's using the CHICKEN "external types" file, which is a purely > static way of declaring types (a bit like declare-checked, but with a > predefined set of types). Yes, that’s a good practice! I’ll look into these types (pun) of files, to see if one can steal it. > For more info on the type declarations themselves, see this: > https://wiki.call-cc.org/man/6/Types I know of these, and they are already used in SRFI 253/273 macros. To much joy. >> Is there a need for such a thing? > > It would be even better if new SRFIs came with type declarations in the > reference implementation. Yes! And that’s why I suggest SRFI 253/273: it’s a widely-implemented and portable SRFI family. And the “dynamic” nature of them you talked about helps here, as SRFI implementors don’t need to remember syntax of type systems for any and every implementation. Which is a burden, with at least three implementations shipping their own incompatible syntaxes and type categories! Thanks, -- Artyom Bologov https://aartaka.me