FFI check declaration with SRFI 273 APIs?
Artyom Bologov 29 May 2026 13:24 UTC
Hi y’all,
One of the motivations for SRFI 253 and 273 was support for explicit
typing in Schemes compiling to C or machine code, so that one does not
have to trick type analyzer (like in PreScheme) or resort to
implementation-specific syntax for types (everywhere else.)
Getting this idea further, maybe 253/273 should provide something like
foreign-lambda-checked (Chicken) or foreign-library-function-checked
(Guile) with Scheme-side predicate checks and C-side types?
A prototype of that for Chicken can be found at
https://gitlab.com/ThatGeoGuy/srfi-253/-/merge_requests/7
Best of luck,
--
Artyom Bologov
https://aartaka.me