Hi Laurent,<div><br></div><div>It is interesting to see the historical evolution of multiple values in Scheme.</div><div>In June 1988 this proposal was posted:</div><div><br></div><div><a href="http://groups.csail.mit.edu/mac/ftpdir/scheme-mail/HTML/rrrs-1988/msg00230.html">http://groups.csail.mit.edu/mac/ftpdir/scheme-mail/HTML/rrrs-1988/msg00230.html</a></div>
<div><br></div><div>At the Snowbird meeting in July 1988 no concensus was found.</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
3.7.  Add LAMBDA*.  Not adopted.  The main objection seemed to be that</blockquote></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
this proposal requires a new kind of stored value (multiple values) that</blockquote></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
either is not an expressed value or does not behave like other expressed</blockquote></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
values.</blockquote><div> </div></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">3.8.  Multiple return values.  Not adopted.  Debate centered on whether</blockquote>
</div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">returning a single &quot;multiple value&quot; should be equivalent to returning</blockquote>
</div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">that value normally.  A secondary issue concerned whether extra return</blockquote>
</div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">values should be ignored or an error.  We approached consensus on this.</blockquote>
</div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">After much debate it was decided to go on to other issues and let</blockquote>
</div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Dybvig and Hanson discuss the matter in private.  Their discussion</blockquote>
</div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">later that night led to a conclusion that we don&#39;t understand the</blockquote>
</div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">issues well enough to charge ahead with either proposal 3.7 or 3.8</blockquote>
</div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">or a variation.</blockquote><div> </div></div><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">3.9.  Optional arguments.  Not considered, as it was felt that this</blockquote>
</div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">would be a more controversial issue than proposal 3.8 on which we had</blockquote>
</div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">just spent a great deal of time.</blockquote></div>
</blockquote><div><br></div><div><div>The discussion went on on this thread:</div><div><a href="http://groups.csail.mit.edu/mac/ftpdir/scheme-mail/HTML/rrrs-1989/msg00148.html">http://groups.csail.mit.edu/mac/ftpdir/scheme-mail/HTML/rrrs-1989/msg00148.html</a></div>
</div><div>Scroll down on this page to see all entries: <a href="http://groups.csail.mit.edu/mac/ftpdir/scheme-mail/HTML/rrrs-1989/threads.html">http://groups.csail.mit.edu/mac/ftpdir/scheme-mail/HTML/rrrs-1989/threads.html</a></div>
<div><br></div><div>The discussion on multiple values pops up now and again. See for example this</div><div>thread on comp.lang.scheme.</div><div><a href="https://groups.google.com/d/msg/comp.lang.scheme/ty2YeqZibNI/VR21X6XP9-IJ">https://groups.google.com/d/msg/comp.lang.scheme/ty2YeqZibNI/VR21X6XP9-IJ</a></div>
<div><br></div><div>As for using multiple values in Racket, I use these lines</div><div>    (define-syntax defv (make-rename-transformer #&#39;define-values))</div><div>    (define-syntax defm (make-rename-transformer #&#39;match-define))</div>
<div>    (define-syntax def  (make-rename-transformer #&#39;define))</div><div>to make local definitions short. </div><div><br></div><div>A little function to make a rotation matrix:</div><div><br></div><div><div>    (define (rotmat/rad θ)</div>
<div>      (defv (cosθ sinθ) (cos&amp;sin θ))</div><div>      (mat cosθ (- sinθ) sinθ cosθ))</div></div><div><br></div><div>-- </div><div>Jens Axel Søgaard</div><div><br></div>