[r6rs-discuss] [Formal] Confusing comparison with Pascal
call-by-reference
William D Clinger
will at ccs.neu.edu
Fri Feb 23 13:56:38 EST 2007
I am posting this as an individual member of the Scheme
community. I am not speaking for the R6RS editors, and
this message should not be confused with the editors'
eventual formal response.
Mike Sperber wrote:
> Suggestions for further improvement are welcome.
IMO, the entire by-whatever terminology is hopelessly
confusing. SFAIK, Algol kicked off the confusion by
making a distinction between call-by-value and
call-by-name, but overloaded call-by-name to mean
what later came to be called call-by-reference with
respect to assignments.
Ever since then, authors have had to explain exactly
what they mean by those terms whenever they use them.
It would be just as easy, and less confusing, for the
R6RS to explain exactly what it means without using
those terms at all.
For example, Scheme passes all parameters by value
in the sense of Pascal, never by reference in the
sense of Pascal. For example, consider
((lambda (a)
((lambda (b)
(set! a '#(11 12 13))
(list (vector-ref a 0) (vector-ref b 0)))
a))
'#(1 2 3 4 5 6 7 8 9 10))
You can't make sense of that example if you think
the arrays are passed by reference in the sense of
Pascal.
Will
More information about the r6rs-discuss
mailing list