[r6rs-discuss] [Formal] Confusing comparison with Pascal call-by-reference

From: <bear>
Date: Sun Mar 11 13:58:36 2007

On Sun, 18 Feb 2007, Mikael Tillenius wrote:

>Description: In section 1, top of right column on page 6 of the report,
>argument passing is discussed. Quote "Note that call-by-value refers to
>a different distinction between by-value and by-reference passing in
>Pascal. In Scheme, all data structures are passed by reference." This
>seems to imply that Scheme passes arguments similar to how Pascals
>call-by-reference. This is not true, for example call-by-reference would
>make it possible to implement a procedure "swap" so that a call "(swap a
>b)" would swap the values of "a" and "b".
>
>Proposal: Remove both sentences quoted above, or at least the last one.

Good catch. Scheme passes all arguments by value, not by reference.
But some values (cons cells, arrays, closures, etc) contain references
to others.

                                Bear
Received on Sun Mar 11 2007 - 13:58:27 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC