<br><br><div><span class="gmail_quote">On 12/24/06, <b class="gmail_sendername">Carl Eastlund</b> &lt;<a href="mailto:cce@ccs.neu.edu">cce@ccs.neu.edu</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 12/24/06, Corey Sweeney &lt;<a href="mailto:corey.sweeney@gmail.com">corey.sweeney@gmail.com</a>&gt; wrote:<br>&gt;<br>&gt; And the rest prefer not to construct an arbitrary, irrelevant syntax so they<br>&gt; use lists ;)
<br>&gt;<br>&gt; But I do see your point.&nbsp;&nbsp;I can now see why some people are using<br>&gt; multi-value&#39;s.&nbsp;&nbsp;But I would argue that it should be a compiler thing, not a<br>&gt; syntax thing.<br><br>Scheme has multiple inputs without resorting to lists (for functions
<br>of fixed input size), so having the same thing for outputs isn&#39;t<br>really arbitrary or irrelevant.&nbsp;</blockquote><div><br>heh.&nbsp; Multiple inputs is generally a arbitrary syntax too.&nbsp; I basically see &quot;(define (my-function a b c) {blah}))&quot; as syntactic sugar for:
<br><br>&quot;(define my-function (lambda (a) (lambda (b) (labmda (c) {blah}))))&quot;<br><br>Your function &quot;{blah}&quot; works the same either way.&nbsp; Also &quot;(my-function x y z)&quot; would be syntacitic sugar for &quot;(((my-function x) y) z)&quot;.
<br>The only differnce from the users perspective is that when implemented as &quot;multi input values syntax&quot; instead of a &quot;bunch of lambdas syntax&quot;, then the interpreter can check for arity errors when calling.&nbsp; 
I.E.&nbsp; in the &quot;bunch of lambdas syntax&quot; method, (define add-two (+ 2)) becomes a valid function, but in the multi input values syntax method (define add-two (+ 2)) throws a arity error and says that it can&#39;t work without 2 parameters, so you need to do:&nbsp; (define add-two (lambda (x) (+ 2 x))).
<br><br><br>However I usually use the &quot;multi value syntax&quot;, because in normal R5RS intrepeters,  &quot;(my-function x y z)&quot; is not syntacitic sugar for &quot;(((my-function x) y) z)&quot;.<br><br><br>in the &quot;bunch of lambda functions syntax&quot; any result list of length 3 or less can be &quot;folded&quot; into my-function.&nbsp; in &quot;multi input values syntax&quot; you get arity errors.
<br><br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&nbsp;Lists (linear, arbitrary-size,<br>usually homogenous data structures), on the other hand, are not a
<br>close fit (for flat, fixed-size, often heterogenous function outputs).<br><br>Anyway, this isn&#39;t (just) an efficiency issue.&nbsp;&nbsp;It&#39;s a matter of what<br>the programmer can express.&nbsp;&nbsp;Multiple values says &quot;this program
<br>outputs these two things&quot;.&nbsp;&nbsp;Lists say &quot;this program outputs a list&quot;.</blockquote><div><br>I think were settled on the effiency issue, but I&#39;m not seeing the non-effencity issue in this one.&nbsp; Are you saying that when i have a set of numbers, that i&#39;m actually saying &quot;i have a set of numbers, not a list of numbers with special set properties added to them&quot;?&nbsp; 
I.E. like we should add set as a new primative because I want to name it differntly then &quot;list of numbers with special set properties&quot;?&nbsp; If we&#39;ve discarded effencicy issues, then we shouldn&#39;t need such a thing, right?
<br><br>Corey<br>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Multiple values aren&#39;t my favorite program construct either, but I
<br>think we&#39;ve covered the ground of why they exist as they are.<br><br>--<br>Carl Eastlund<br></blockquote></div><br><br>-- <br>((lambda (y) (y y)) (lambda (y) (y y)))