Re: Returning records instead of multiple values Dr. Arne Babenhauserheide 19 Sep 2026 22:57 UTC
Artyom Bologov <xxxxxx@aartaka.me> writes:

> Besides, portable code would only need and have argument checks and
> return checks in either of scenarios—multiple values, alist, or records.

How do you solve the issue when there are two typed procedures, one
using define-checked and one using define-typed?

If there is implementation-specific metadata that may or may not be
present in the records, they may need different record types.

This could be resolved stating that metadata fields must always accept
#f as value (as in: cannot retrieve) and then implementation for
SRFI-253 and SRFI-284 procedures would always use the same record types.

Besides: SRFI-284 is now the srfi for define-typed (mainly thanks to you).

https://srfi.schemers.org/srfi-284/srfi-284.html

> I’m inclined to go down the sequence-of-records route, as it’s the most
> structured and strict option with clearly named accessors for
> everything.

What do you mean by "sequence of records"? I thought that the proposal
was to return one record which has at least two fields (arguments and
return values).

Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
https://www.draketo.de