Re: Exceptions and conditions
Wolfgang Corcoran-Mathe 31 Aug 2024 19:57 UTC
Hi Artyom, and thanks for the quick reply.
On 2024-08-31 18:02 +0400, Artyom Bologov wrote:
> - Accommodation of existing implementation behavior. Chicken, for
> example, ignores type annotations in interpreter mode, only checking
> them during compilation.
I think this is due to the lack of static analysis in the CHICKEN
interpreter. In any case, runtime type-checks like the ones in this
SRFI will still be performed when running a program in the interpreter.
> - Allowing undefined behavior for heavily-optimized implementations
> (like Stalin if I manage to contribute this SRFI there; or Pre-Scheme,
> where I'm trying to contact the maintainer for collaboration.)
>
> - Allowing to omit the (potentially expensive) checks for production
> builds, only checking in debug mode.
Again, I’d still like to have a guarantee that failures will signal
an error when the program is compiled/run in “debug mode”. Is there
a situation in which this would impose a performance penalty on
non-debug-mode programs?
This is splitting hairs a bit, I know. Most implementations will do
the Right Thing; I imagine that only the truly hardcore, opinionated
compilers will ignore petty things like type checks.
--
Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>