[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] multiple values module




On Fri, May 20, 2011 at 9:44 PM, John Cowan <cowan@x> wrote:
a compiler can reject (map (foo)) as erroneous, but under a "return on the stack" implementation, (foo) might return both the function and the list to map. 

Ouch... Such arguments splicing would be disastrous for security concerns ! There is a specific interface for using values : 'values' and 'call-with-values'

Why not specifying that arguments in procedure calls should each evaluate to exactly one value ?

With this implementations could decide to reify values if they wish. Of course if they do so, please at least do it with a disjoint type. (Alex, could you wrap chibi's values to internal lists for instance ?)

Similarly binding init would evaluate to only one value.

I will fill a ticket about this.

I also agree with R6RS about sequencing constructs having multiple values inside their body :
"The continuations of all non-final expressions within a sequence of expressions, such as in lambda, begin, let, let*, letrec, letrec*, case, and cond forms, take an arbitrary number of values."

Best regards,
--
Emmanuel Medernach
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports