Hello y’all,

Full disclosure: I’m the author of SRFI 253.

I wonder if it’s possible to have SRFI 253
<https://srfi.schemers.org/srfi-253/srfi-253.html> support in Guile in
an efficient/correct way, instead of simply packaging the sample
implementation?

The reason I frame it this way is because I’ve seen this post by Dave
Thompson on optimizing Guile code
<https://dthompson.us/posts/optimizing-guile-scheme.html> and one of the
things of note there was type guard conditionals. Which means that Guile
does some unboxing internally given enough information. SRFI 253 (and
its check-arg) expects exactly this kind of mechanism for stronger
guards.

I think that somehow exposing Guile typing to 253’s macros would be a
better way to approach integrated 253 support than adding heavy asserts
everywhere (like my sample implementation does.)

The closest thing to proper type checking/declaration I was able to find
is SCM_ASSERT_TYPE macro, but it doesn’t seem to be exposed on the
Scheme side. So I’m mostly clueless as to how to approach contributing
SRFI 253 support to y’all.

Best of love,
-- 
Artyom Bologov
https://aartaka.me

Reply via email to