multivalues behavior Arvydas Silanskas (07 Dec 2022 09:37 UTC)
Re: multivalues behavior Marc Nieper-Wißkirchen (07 Dec 2022 09:49 UTC)

Re: multivalues behavior Marc Nieper-Wißkirchen 07 Dec 2022 09:49 UTC

Good day, Arvydas,

Am Mi., 7. Dez. 2022 um 10:37 Uhr schrieb Arvydas Silanskas
<xxxxxx@gmail.com>:
>
> Good day,
>
> very surprising to see this SRFI, in that, it's unclear to me how usable multiple values as a concept were up to this point in r6rs without the existence of (what seems to me) a corner stone syntax like define-values.

Before R6RS, internal defines were harder to optimize (because of the
R5RS letrec* semantics that doesn´t restrict the use of call/cc).  I
guess that's why generalizations to the `define' form (like
`define-values') have arrived only gradually.  Before R6RS, let or
SRFI 11's let-values were usually favorable for fast code.  It seems
to me that the new R6RS semantics for letrec* weren't fully exploited
when the language was finally standardized.

When writing R6RS code (and without SRFI 244), using let-values
instead of define-values is usually fine.  However, it causes extra
indentation levels, and sometimes one really wants to have letrec*
semantics.

> Somewhat offtangently, on reddit someone brought up a quite useful potential operational distinction between multiple values and list wrapping https://www.reddit.com/r/scheme/comments/zdp1b5/srfi_244_multiplevalue_definitions/iz50062/  , but this is actually unspecified. Maybe it should be specified somehow somewhere, to make multiple values a more appealing feature? Although maybe not necessarily by this SRFI.

Thanks for the link; I will answer directly on Reddit.

Marc