When writing on a parser with normal infix syntax, I found that treating tuples 
as reifications of values convenient. However, implementing this in a 
systematic way is very inefficient it seems, as all calls must be passed 
through call-with-values. Would having this extension risk inefficient Scheme 
implementations?

Roughly, a normal infix expression f(x_1, ..., x_k) corresponds to Scheme 
syntax (f x_1 ... x_k), where (x_1, ..., x_k) is a data type satisfying a 
singleton reduction rule (x) = x. If writing (f (values x_1 ... x_k)) the 
result would be the same as (call-with-values (lambda () (values x_1 ... x_k)) 
f), so call-with-values would not be necessary here. If returning (values x_1 
... x_k) in a position where the standard now says the result is unspecified, 
one would get a singleton reduced tuple (x_1, ..., x_k).

Hans



_______________________________________________
Scheme-reports mailing list
[email protected]
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports

Reply via email to