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

From: Michael Sperber <sperber>
Date: Wed Feb 21 08:31:36 2007

Mikael Tillenius <mti_at_tillenius.com> writes:

> 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".

I don't think it implies that: It says "data structures" rather than
"variables", which is what you'd need for `swap'. The distinction is
important, as shown here:

http://lists.r6rs.org/pipermail/r6rs-discuss/2007-January/001346.html

For now, I'll say "mutable data structures" to make things more
precise and to make it harder to gloss over the semantic
distinction. Suggestions for further improvement are welcome.

-- 
Cheers =8-} Mike
Friede, V?lkerverst?ndigung und ?berhaupt blabla
Received on Wed Feb 21 2007 - 08:31:30 UTC

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