Re: Multiple values and efficiency
Adam Nelson 31 Aug 2020 16:48 UTC
There probably would have been a niche use for this, and it might be
more useful than the current _ ... semantics (I don't think there are
many situations where the current semantics would be useful, I only
added <...> in the first place to mirror the syntax of SRFI 26 cut).
But, given that the current _ ... syntax clearly communicates expanding
into the argument list rather than inserting a list, and <...> isn't
being used anymore, I don't see a reason to add this now.
On 6/15/20 6:20 AM, Marc Nieper-Wißkirchen wrote:
> I have been thinking a bit more about how to handle multiple values
> uniformly and efficiently, in particular, the "<...>" construct.
>
> What would you think about the solution to make the "apply" that would
> be needed explicitly? In other words, "<...>" shall expand into a list
> (which is as efficient as the rest argument of let*-values or
> receive). It is then up to the user to use apply or take this list
> as-is:
>
> (chain (values 1 2 3) (apply list <...>))
>
> would evaluate to (1 2 3), while
>
> (chain (values 1 2 3) (list <...>)
>
> would evaluate to ((1 2 3)).
>
> I'm not yet sure about it; at the moment, it is just an idea.