Email list hosting service & mailing list manager


Request for Clarification on Rationale Abdulaziz Ghuloum 04 Apr 2006 19:46 UTC

Greetings,

The "Rationale" sections states:

    QUOTE: It is impossible to bind the evaluated result of VALUES
expression
    QUOTE: to a single variable unlike other Scheme expressions.

I assume you mean "other Scheme values", not expressions.  Doesn't the
following code bind the evaluated result of VALUES to a single variable?

(call-with-values (lambda () (values 1 2 3))
   (lambda VALS
     VALS))

    QUOTE: Moreover, the pair of VALUES and CALL-WITH-VALUES is clumsy
to use

Is this a fact or an opinion?  A SRFI would be more appealing to
implementors
if its rationale is based on facts.

    QUOTE: and somewhat slow under some circumstances.

How slow is "somewhat slow"?  How do you quantify it?  And what are the
circumstances that make VALUES and CALL-WITH-VALUES somewhat slow?  Or
do you really mean under some *implementations*?  Was the topic of
Efficient Implementation of Multiple Return Values in Scheme ever
discussed in the literature?

    QUOTE: A solution would be to enclose the arguments of VALUES
expression
    QUOTE: in a procedure of one argument, a consumer procedure of
    QUOTE: CALL-WITH-VALUS.

How does this SRFI address the efficiency problem?  Looking at the
implementation section, I see many calls to
call-with-current-continuation.
Is that not somewhat slow under some circumstances?  Looking further
down,
there are many recursive procedures and many assignments that are
performed
at runtime.  Maybe your intension is to have a reference implementation
outlining the concept and implementors are encouraged to provide their
own
implementations.  If that's the case, it may be a good idea to state it
in the implementation section.

Thank you very much.

Aziz,,,