Unspecified result Lassi Kortela (07 Nov 2022 12:01 UTC)
Re: Unspecified result Marc Nieper-Wißkirchen (07 Nov 2022 13:01 UTC)
Re: Unspecified result Lassi Kortela (07 Nov 2022 13:18 UTC)
Re: Unspecified result Marc Nieper-Wißkirchen (07 Nov 2022 13:31 UTC)
Re: Unspecified result Lassi Kortela (07 Nov 2022 13:47 UTC)
Re: Unspecified result Marc Nieper-Wißkirchen (07 Nov 2022 13:56 UTC)
Re: Unspecified result Lassi Kortela (07 Nov 2022 14:14 UTC)
Re: Unspecified result Marc Nieper-Wißkirchen (07 Nov 2022 14:20 UTC)
Re: Unspecified result Lassi Kortela (07 Nov 2022 14:45 UTC)
Re: Unspecified result Marc Nieper-Wißkirchen (07 Nov 2022 14:50 UTC)
Re: Unspecified result John Cowan (07 Nov 2022 14:45 UTC)
Re: Unspecified result Marc Nieper-Wißkirchen (07 Nov 2022 14:53 UTC)

Re: Unspecified result Lassi Kortela 07 Nov 2022 13:47 UTC

> I could add a recommendation of returning zero values.

Sounds good.

> Regarding program correctness and theoretical appeal, the best
> resolution would be to equate "undefined returns" with "zero values".
> Some code may break, but such code is probably buggy with a high
> chance.

Agreed. But see also https://docs.scheme.org/surveys/void-value/

It might be useful to have an (undefined) macro expanding to whichever
value any given Scheme implementation uses for undefined values.

The RnRS term "undefined" surely means the value can differ between
different procedures returnig undefined results, and even between
different invocations of the same procedure. But that seems like it's
strictly a concession to the existing variety between implementations,
and not something that makes for sound theory or a clean spec.