Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Delta: We're Amtrak with wings. -- David Letterman


devel / comp.lang.scheme / Re: on call by reference

SubjectAuthor
* on call by referenceJohanne Fairchild
+- Re: on call by referenceLawrence D'Oliveiro
+* Re: on call by referenceDmitri Volkov
|+- Re: on call by referenceLawrence D'Oliveiro
|`- Re: on call by referenceSchol-R-LEA
+* Re: on call by referenceAlan Bawden
|`* Re: on call by referenceJohanne Fairchild
| `* Re: on call by referenceAlan Bawden
|  `- Re: on call by referenceJohanne Fairchild
`* Re: on call by referenceSchol-R-LEA
 +* Re: on call by referenceSchol-R-LEA
 |`* Re: on call by referenceChris Vine
 | `* Re: on call by referenceLawrence D'Oliveiro
 |  `* Re: on call by referenceChris Vine
 |   `- Re: on call by referenceLawrence D'Oliveiro
 +* Re: on call by referenceAlan Bawden
 |`- Re: on call by referenceSchol-R-LEA
 `* Re: on call by referenceLawrence D'Oliveiro
  `- Re: on call by referenceSchol-R-LEA

1
on call by reference

<877chyiosp.fsf@tudado.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=343&group=comp.lang.scheme#343

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jfairchild@tudado.org (Johanne Fairchild)
Newsgroups: comp.lang.scheme
Subject: on call by reference
Date: Tue, 19 Mar 2024 05:55:18 -0300
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <877chyiosp.fsf@tudado.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="7aff4695c44eee6d3b97efe88388cf90";
logging-data="789655"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ogeuwfqPHKn2JSoUb1BrOQOx3oZ7nRoo="
Cancel-Lock: sha1:UFlkggncdIVlg4oCH9A9GMy7GAc=
sha1:AikMMpM+MVxIUSVNSH2xsNP1WmY=
 by: Johanne Fairchild - Tue, 19 Mar 2024 08:55 UTC

I tried to answer whether Scheme was call-by-reference and I did not
think the definition of call-by-reference seen on the web is precise
enough. For instance,

Call by reference (or pass by reference) is an evaluation strategy
where a parameter is bound to an implicit reference to the variable
used as argument, rather than a copy of its value. This typically
means that the function can modify (i.e., assign to) the variable used
as argument—something that will be seen by its caller.

Source:
https://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_reference

It doesn't say how the modification is done. So we can say that Python
is call-by-reference, but surely not whe the data is imutable---then
Python is sometimes call-by-reference. Just this observation already
makes a language sometimes call-by-reference and sometimes not. So

``Is Scheme call-by-reference?''

would not make any sense. We can change data by way of its
argument---set-car!, say. On the other hand, in Scheme arguments are
passed with an implicit reference to the variable, so it is
call-by-reference, except perhaps when the argument is immutable.

So I am totally confused. These definition seem like a mess.

Can you point me out to good definitions you might know of in academic
books on the subject? Thank you.

Re: on call by reference

<utd3do$12lm6$3@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=345&group=comp.lang.scheme#345

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Tue, 19 Mar 2024 22:26:01 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <utd3do$12lm6$3@dont-email.me>
References: <877chyiosp.fsf@tudado.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 19 Mar 2024 22:26:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="cf2257effda993e7401c0124f815988b";
logging-data="1136326"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18cW4bqZADjYrStyYe5NvnF"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:zlm0saKmLMGuHqoQ8bVkd7xJ6Gs=
 by: Lawrence D'Oliv - Tue, 19 Mar 2024 22:26 UTC

On Tue, 19 Mar 2024 05:55:18 -0300, Johanne Fairchild wrote:

> So we can say that Python is call-by-reference, but surely not whe the
> data is imutable---then Python is sometimes call-by-reference.

Python is call-by-value. It’s just that the concept of “value” also
includes “pointer to object”.

Re: on call by reference

<2dfa599e-2311-4d72-a115-c0af416fa3c8@gmail.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=346&group=comp.lang.scheme#346

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dmitri.s.volkov@gmail.com (Dmitri Volkov)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Tue, 19 Mar 2024 21:28:04 -0400
Organization: A noiseless patient Spider
Lines: 77
Message-ID: <2dfa599e-2311-4d72-a115-c0af416fa3c8@gmail.com>
References: <877chyiosp.fsf@tudado.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="47b24e9ca9f95990a227377fa1c7bdac";
logging-data="1203868"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19I+MUBc5j3DZK3aHkRnboP"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:n2+boS9o1t5qW0pKJ2enW8PLmbU=
Content-Language: en-US
In-Reply-To: <877chyiosp.fsf@tudado.org>
 by: Dmitri Volkov - Wed, 20 Mar 2024 01:28 UTC

I believe that scheme is call-by-value. My understanding that in a
call-by-reference language, the variables themselves are passed, whereas
in a call-by-value language, the value of variables are passed.

Consider the following:

(define f (lambda (x) (set! x 5) x))
(define a 3)
a ; returns 3
(f a) ; returns 5
a ; returns 3 for call-by-value, 5 for call-by-reference

In a call-by-value language, the evaluation order is something like this:

(f a)
(f 3)
; enter (f 3)
(set! x 5)
x 5 ; return result of (f a)
a 3 ; return result of a

Whereas in a call-by-reference language, the evaluation order is more like:

(f a)
; enter (f a)
(set! x 5)
(set! a 5)
x a
5 ; return result of (f a)
a 3 ; return result of a

It doesn't have to do with whether the types themselves ar immutable or
not; integers are immutable in pretty much every language.

This pdf has toy implementations of languages with different calling
conventions, which should be useful:
https://cgi.luddy.indiana.edu/~c311/lib/exe/fetch.php?media=call-by.pdf

Anyone please feel free to correct me if anything I put here is wrong.
Also first time posting on usenet, so if I broke any conventions please
let me know so that I get them right next time. Thanks!

On 2024-03-19 4:55 a. m., Johanne Fairchild wrote:
> I tried to answer whether Scheme was call-by-reference and I did not
> think the definition of call-by-reference seen on the web is precise
> enough. For instance,
>
> Call by reference (or pass by reference) is an evaluation strategy
> where a parameter is bound to an implicit reference to the variable
> used as argument, rather than a copy of its value. This typically
> means that the function can modify (i.e., assign to) the variable used
> as argument—something that will be seen by its caller.
>
> Source:
> https://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_reference
>
> It doesn't say how the modification is done. So we can say that Python
> is call-by-reference, but surely not whe the data is imutable---then
> Python is sometimes call-by-reference. Just this observation already
> makes a language sometimes call-by-reference and sometimes not. So
>
> ``Is Scheme call-by-reference?''
>
> would not make any sense. We can change data by way of its
> argument---set-car!, say. On the other hand, in Scheme arguments are
> passed with an implicit reference to the variable, so it is
> call-by-reference, except perhaps when the argument is immutable.
>
> So I am totally confused. These definition seem like a mess.
>
> Can you point me out to good definitions you might know of in academic
> books on the subject? Thank you.

Re: on call by reference

<86y1adppl8.fsf@williamsburg.bawden.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=347&group=comp.lang.scheme#347

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!bawden.eternal-september.org!.POSTED!not-for-mail
From: alan@csail.mit.edu (Alan Bawden)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Tue, 19 Mar 2024 23:08:35 -0400
Organization: ITS Preservation Society
Lines: 19
Message-ID: <86y1adppl8.fsf@williamsburg.bawden.org>
References: <877chyiosp.fsf@tudado.org>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: bawden.eternal-september.org; posting-host="936734233a02e77bade13b16af65a299";
logging-data="1360641"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18322k8Lbfncg1ZoLH07Bi1"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
Cancel-Lock: sha1:9PVfka4zYMiDQz0UKgzAiiM7rS4=
sha1:DFrnWjnvoGtkN0a053Xax+tjDr8=
 by: Alan Bawden - Wed, 20 Mar 2024 03:08 UTC

Scheme is call-by-value. Python is call-by-value. Java is
call-by-value. C is call-by-value. In none of those languages can you
write a procedure that assigns a variable used as an argument to that
procedure. Read that carefully. "Assigns" means to change what the
variable references. "Assigns" does _not_ mean to make modifications to
the thing that the variable references. In Python terms "x = 4" is an
assignment to "x", but "x[1] = 4" is not an assignment to "x" because
afterwards "x" still references the same object.

English is a bit slippery here, so people often find this distinction
confusing. To make it clearer ask yourself what it means to "change
your socks". Does it mean you took your socks off and put on a
different pair? Or does it mean you dyed the socks you are wearing a
different color?

A call by value language doesn't let you put on a different pair of
socks, it only lets you dye them a different color.

- Alan

Re: on call by reference

<utdk3v$19g6t$3@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=348&group=comp.lang.scheme#348

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Wed, 20 Mar 2024 03:10:55 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <utdk3v$19g6t$3@dont-email.me>
References: <877chyiosp.fsf@tudado.org>
<2dfa599e-2311-4d72-a115-c0af416fa3c8@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 20 Mar 2024 03:10:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a3c7bb3811b3cbef9d335e33aa837a41";
logging-data="1360093"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18l3s9k30XUfalZcKqkQyM1"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:2pDugJNPiW4tnzdVk70XtELLuSM=
 by: Lawrence D'Oliv - Wed, 20 Mar 2024 03:10 UTC

On Tue, 19 Mar 2024 21:28:04 -0400, Dmitri Volkov wrote:

> My understanding that in a call-by-reference language, the variables
> themselves are passed ...

This is right.

Though what happens in a language like Perl, where you can obtain
references to variables (e.g. “\$a”) as values in their own right?

I guess this is where you a really blurring the boundaries ...

Re: on call by reference

<uter6e$1h8tm$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=349&group=comp.lang.scheme#349

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: alicetrillianosako@gmail.com (Schol-R-LEA)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Wed, 20 Mar 2024 10:17:50 -0400
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <uter6e$1h8tm$1@dont-email.me>
References: <877chyiosp.fsf@tudado.org>
<2dfa599e-2311-4d72-a115-c0af416fa3c8@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 20 Mar 2024 14:17:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="66d48328225f3a70f5d6636ec8b98f1b";
logging-data="1614774"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/8wFjpqoD2zVbIASThbKxjtbtjADQg7HA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:k0bMmc/5O9d6Ni3NjwuohZP+3fE=
In-Reply-To: <2dfa599e-2311-4d72-a115-c0af416fa3c8@gmail.com>
Content-Language: en-US
 by: Schol-R-LEA - Wed, 20 Mar 2024 14:17 UTC

Dmitri Volkov:> Also first time posting on usenet, so if I broke any
conventions please
> let me know so that I get them right next time. Thanks!

Only in that top posting - that is, putting your reply before the quoted
text - is generally frowned upon. You usually want to reply below the
relevant text, such that the answer flows from the question, even if it
means interleaving multiple answers with different quoted sections.

All in all, though, not bad for a first post.

Re: on call by reference

<utetgj$1hs9g$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=350&group=comp.lang.scheme#350

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: alicetrillianosako@gmail.com (Schol-R-LEA)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Wed, 20 Mar 2024 10:57:18 -0400
Organization: A noiseless patient Spider
Lines: 78
Message-ID: <utetgj$1hs9g$1@dont-email.me>
References: <877chyiosp.fsf@tudado.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 20 Mar 2024 14:57:24 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="66d48328225f3a70f5d6636ec8b98f1b";
logging-data="1634608"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+JP+F6uPvm+3VwvA5xYFlnGWzI2U5hl6k="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:aMRbZP03qbydCI4Z1atCOjPt/Ug=
Content-Language: en-US
In-Reply-To: <877chyiosp.fsf@tudado.org>
 by: Schol-R-LEA - Wed, 20 Mar 2024 14:57 UTC

Johanne Fairchild:
> I tried to answer whether Scheme was call-by-reference and I did not
> think the definition of call-by-reference seen on the web is precise
> enough.

Scheme is call-by-value; arguments to procedures are copied into the
parameters in the procedure's environment. As I understand it, even when
the argument is a reference - such as with a list - a full copy of the
argument is made local to the procedure.

Each instance where a form alters a value, rather than returning a new
one, the form is either a primitive form (e.g., (set!), (set-car!),
(set-cdr!)) or a macro (in which the body of the macro is expanded into
the code in place; that is to say, the generated code replaces the macro
invocation). The same holds for cases where an argument is conditionally
evaluated (e.g., the consequent and alternative in an (if) form).

> For instance,
>
> Call by reference (or pass by reference) is an evaluation strategy
> where a parameter is bound to an implicit reference to the variable
> used as argument, rather than a copy of its value. This typically
> means that the function can modify (i.e., assign to) the variable used
> as argument—something that will be seen by its caller.
>
> Source:
> https://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_reference
>
> It doesn't say how the modification is done.

In call-by-reference, what is passed is a pointer or similar reference
to the

Very, very few current languages support call-by-reference, and those
which do generally do so explicitly, such as with Pascal's VAR
parameters. Even some which allow passing of mutable variables do not
actually use call-by-reference semantics - Ada, for example, IIUC is
better described as using call-by-value-and-copy semantics for 'out' and
'in out' parameters, though the actual implementation may and often does
use call-by-reference internally, so long as it behaves as if it is
copying the modified value back to the argument.

Languages such as C and C++ are interesting in this regard, as they have
only call-by-value semantics, but also support passing explicit
pointers, which allows them to simulate call-by-reference semantics by
the passing of explicit pointers.

Similarly, in languages such as Java or Python, call-by-value is used to
pass variables, whether they hold primitives or object references; but
since object variables themselves are references (usually, but not
necessarily, implemented as pointers) to heap objects, it allows for the
referred object to be modified by the referring variables.

> So we can say that Python
> is call-by-reference, but surely not when the data is immutable---then
> Python is sometimes call-by-reference.

Python is always call-by-value; however, in some cases, the 'value' is
itself a reference.

> Just this observation already
> makes a language sometimes call-by-reference and sometimes not. So
>
> ``Is Scheme call-by-reference?''
>
> would not make any sense. We can change data by way of its
> argument---set-car!, say. On the other hand, in Scheme arguments are
> passed with an implicit reference to the variable, so it is
> call-by-reference, except perhaps when the argument is immutable.

As I said earlier, Scheme always uses call-by-value semantics in
procedures (one could argue that 'classical' Lisp macros use
call-by-name semantics, whereas hygienic macros use a complex
combination of call-by-value and call-by-name, but I will leave that to
others to debate). Only primitive forms and macros can actually modify a
value, rather than returning a new one.

Comments and corrections welcome.

Re: on call by reference

<uteu3o$1hsjh$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=351&group=comp.lang.scheme#351

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: alicetrillianosako@gmail.com (Schol-R-LEA)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Wed, 20 Mar 2024 11:07:36 -0400
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <uteu3o$1hsjh$1@dont-email.me>
References: <877chyiosp.fsf@tudado.org> <utetgj$1hs9g$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 20 Mar 2024 15:07:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="66d48328225f3a70f5d6636ec8b98f1b";
logging-data="1634929"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19CpOrcHzxWItKkOcLQUzZEO8pyvT2YPNI="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:BHbPH01B6Gpl1cV+B5AlBoIILis=
In-Reply-To: <utetgj$1hs9g$1@dont-email.me>
Content-Language: en-US
 by: Schol-R-LEA - Wed, 20 Mar 2024 15:07 UTC

I apologize, I lost my train of thought for part of this:

Schol-R-LEA:

> In call-by-reference, what is passed is a pointer or similar reference
> to the

....to the variable.

In effect, a language in which call-by-reference is used, parameters are
implicit pointers to the arguments. So, by comparison to C,

void foo(int bar)
{ bar = 23;
}

in a call-by-reference dialect would be equivalent to

void foo(int* bar)
{ *bar = 23;
}

in standard C.

For obvious reasons, this presents problems with potential side effects
and is harmful to modularity, as any change to the parameter variable
would silently change the argument. This is why most languages which
support call-by-reference at all do so explicitly, with call-by-value
being the default.

Re: on call by reference

<87o7b8emlm.fsf@tudado.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=352&group=comp.lang.scheme#352

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jfairchild@tudado.org (Johanne Fairchild)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Wed, 20 Mar 2024 16:20:53 -0300
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <87o7b8emlm.fsf@tudado.org>
References: <877chyiosp.fsf@tudado.org>
<86y1adppl8.fsf@williamsburg.bawden.org>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="d220832ae7fe558a68d062ab3e74107b";
logging-data="1760013"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+RzCFD7CHdlJJOhYcjFRMIQVF2KzcOueU="
Cancel-Lock: sha1:wG50xyPiBFBgcl4EC7fuFcTzMsc=
sha1:Gcl1zgkg8u5Pb9cu6qDNhe0BEfA=
 by: Johanne Fairchild - Wed, 20 Mar 2024 19:20 UTC

Alan Bawden <alan@csail.mit.edu> writes:

> Scheme is call-by-value. Python is call-by-value. Java is
> call-by-value. C is call-by-value. In none of those languages can you
> write a procedure that assigns a variable used as an argument to that
> procedure. Read that carefully. "Assigns" means to change what the
> variable references. "Assigns" does _not_ mean to make modifications to
> the thing that the variable references. In Python terms "x = 4" is an
> assignment to "x", but "x[1] = 4" is not an assignment to "x" because
> afterwards "x" still references the same object.

Thank you. That's *very* helpful.

> English is a bit slippery here, so people often find this distinction
> confusing. To make it clearer ask yourself what it means to "change
> your socks". Does it mean you took your socks off and put on a
> different pair? Or does it mean you dyed the socks you are wearing a
> different color?
>
> A call by value language doesn't let you put on a different pair of
> socks, it only lets you dye them a different color.

If I understand it right, call-by-reference means the same variable that
was outside of a procedure call gets passed in to the procedure. So if
I assign a new value to it, it /must/ change the value outside because
it is the /same/ variable. So I would've expected the analogy to
somehow say that call-by-reference doesn't let me change socks at all.
It wouldn't even let me dye them a different color. I haven't
understood the analogy. What gets mapped to the socks-idea? (Not
variables, I guess.)

Call-by-value means a procedure gets a copy of the variable that was
outside of the procedure, although this copy might contain the location
of some data and so the procedure is able to go to that location and
make changes to the data.

Thanks so much!

Re: on call by reference

<86ttl0pmqx.fsf@williamsburg.bawden.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=353&group=comp.lang.scheme#353

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!bawden.eternal-september.org!.POSTED!not-for-mail
From: alan@csail.mit.edu (Alan Bawden)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Wed, 20 Mar 2024 18:22:14 -0400
Organization: ITS Preservation Society
Lines: 16
Message-ID: <86ttl0pmqx.fsf@williamsburg.bawden.org>
References: <877chyiosp.fsf@tudado.org> <utetgj$1hs9g$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: bawden.eternal-september.org; posting-host="936734233a02e77bade13b16af65a299";
logging-data="1845013"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+K7sVFvnFFrHXC2Y7sH9mp"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
Cancel-Lock: sha1:smO5Eq1tO5DSgCdsfXAfp7WpxkU=
sha1:rqD53z5C6zsIUjp4ZKob5ww/mlE=
 by: Alan Bawden - Wed, 20 Mar 2024 22:22 UTC

Schol-R-LEA <alicetrillianosako@gmail.com> writes:

Johanne Fairchild:
> I tried to answer whether Scheme was call-by-reference and I did not
> think the definition of call-by-reference seen on the web is precise
> enough.

Scheme is call-by-value; arguments to procedures are copied into the
parameters in the procedure's environment. As I understand it, even when
the argument is a reference - such as with a list - a full copy of the
argument is made local to the procedure.

If by "a full copy" you mean that a list passed to a procedure will be
copied, then you are mistaken.

- Alan

Re: on call by reference

<86plvopm6a.fsf@williamsburg.bawden.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=354&group=comp.lang.scheme#354

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!bawden.eternal-september.org!.POSTED!not-for-mail
From: alan@csail.mit.edu (Alan Bawden)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Wed, 20 Mar 2024 18:34:37 -0400
Organization: ITS Preservation Society
Lines: 14
Message-ID: <86plvopm6a.fsf@williamsburg.bawden.org>
References: <877chyiosp.fsf@tudado.org>
<86y1adppl8.fsf@williamsburg.bawden.org> <87o7b8emlm.fsf@tudado.org>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: bawden.eternal-september.org; posting-host="936734233a02e77bade13b16af65a299";
logging-data="1853032"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX192efn21fzkQTyxsIxnugAe"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
Cancel-Lock: sha1:pRxMGmZTYOGaRE1wKu98ZeuxujA=
sha1:BG87TyNQFj74xSoHLUG35B2qPwU=
 by: Alan Bawden - Wed, 20 Mar 2024 22:34 UTC

Johanne Fairchild <jfairchild@tudado.org> writes:

If I understand it right, call-by-reference means the same variable that
was outside of a procedure call gets passed in to the procedure. So if
I assign a new value to it, it /must/ change the value outside because
it is the /same/ variable. So I would've expected the analogy to
somehow say that call-by-reference doesn't let me change socks at all.

You would? You must be completely mis-interpreting my analogy because I
cannot for the life of me figure out how you came to that expectation!
But don't sweat it -- it's just an analogy. Stick to what I said
first: "x[1] = 4" does not make "x" refer to a different thing.

- Alan

Re: on call by reference

<87r0g4cyb2.fsf@tudado.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=355&group=comp.lang.scheme#355

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jfairchild@tudado.org (Johanne Fairchild)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Wed, 20 Mar 2024 19:50:57 -0300
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <87r0g4cyb2.fsf@tudado.org>
References: <877chyiosp.fsf@tudado.org>
<86y1adppl8.fsf@williamsburg.bawden.org> <87o7b8emlm.fsf@tudado.org>
<86plvopm6a.fsf@williamsburg.bawden.org>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="d220832ae7fe558a68d062ab3e74107b";
logging-data="1857563"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19x8DFHusMtenOi/nTaBdEBYmjlffEJqrs="
Cancel-Lock: sha1:e5aHxYjO7eJVjFPB8a4aKemHXW4=
sha1:+4Adx5TmRO36qNDg05FbCxb5e/Q=
 by: Johanne Fairchild - Wed, 20 Mar 2024 22:50 UTC

Alan Bawden <alan@csail.mit.edu> writes:

> Johanne Fairchild <jfairchild@tudado.org> writes:
>
> If I understand it right, call-by-reference means the same variable that
> was outside of a procedure call gets passed in to the procedure. So if
> I assign a new value to it, it /must/ change the value outside because
> it is the /same/ variable. So I would've expected the analogy to
> somehow say that call-by-reference doesn't let me change socks at all.
>
> You would? You must be completely mis-interpreting my analogy because I
> cannot for the life of me figure out how you came to that expectation!
> But don't sweat it -- it's just an analogy. Stick to what I said
> first: "x[1] = 4" does not make "x" refer to a different thing.

I didn't understand the analogy. (I'm slow!) I have a clue what the
misunderstanding is, but let's leave it alone. The example is good and
I feel I understand the concept now. Thank you so much.

Re: on call by reference

<utft6a$1pfg9$4@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=356&group=comp.lang.scheme#356

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Wed, 20 Mar 2024 23:58:02 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <utft6a$1pfg9$4@dont-email.me>
References: <877chyiosp.fsf@tudado.org> <utetgj$1hs9g$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 20 Mar 2024 23:58:02 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="badb6633f042ee08dd03f65d8f49603e";
logging-data="1883657"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ugnUeiINgyEDGAowWktXq"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:j3q+HEzV9M3QzI+oCW0SWIHFE9c=
 by: Lawrence D'Oliv - Wed, 20 Mar 2024 23:58 UTC

On Wed, 20 Mar 2024 10:57:18 -0400, Schol-R-LEA wrote:

> Languages such as C and C++ are interesting in this regard, as they have
> only call-by-value semantics, but also support passing explicit
> pointers, which allows them to simulate call-by-reference semantics by
> the passing of explicit pointers.

C++ allows “references”, where the “pointer” part is no longer explicit.
E.g.

ResType Func
(
ArgType & Arg
)
{
...
} /*Func*/

But of course this is not tied to function arguments at all, and can be
used elsewhere, e.g.

int A;
int & const B = A;

Now any assignment to “B” actually changes the value of “A”.

Re: on call by reference

<utg0ok$1qefr$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=357&group=comp.lang.scheme#357

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: alicetrillianosako@gmail.com (Schol-R-LEA)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Wed, 20 Mar 2024 20:59:00 -0400
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <utg0ok$1qefr$1@dont-email.me>
References: <877chyiosp.fsf@tudado.org> <utetgj$1hs9g$1@dont-email.me>
<86ttl0pmqx.fsf@williamsburg.bawden.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 21 Mar 2024 00:59:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e0a575d7620ab5e169a2a9922223a30b";
logging-data="1915387"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+wE3b2dmVXhLRmXTmWU1mnQB3eSDm0ZtE="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:E+/CG6lOPQ3o8tRas7FL2Sslt5s=
In-Reply-To: <86ttl0pmqx.fsf@williamsburg.bawden.org>
Content-Language: en-US
 by: Schol-R-LEA - Thu, 21 Mar 2024 00:59 UTC

Alan Bawden:
> Schol-R-LEA <alicetrillianosako@gmail.com> writes:
>
> Johanne Fairchild:
> > I tried to answer whether Scheme was call-by-reference and I did not
> > think the definition of call-by-reference seen on the web is precise
> > enough.
>
> Scheme is call-by-value; arguments to procedures are copied into the
> parameters in the procedure's environment. As I understand it, even when
> the argument is a reference - such as with a list - a full copy of the
> argument is made local to the procedure.
>
> If by "a full copy" you mean that a list passed to a procedure will be
> copied, then you are mistaken.

Ah, thank you for the correction.

Re: on call by reference

<utg0r4$1qdpg$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=358&group=comp.lang.scheme#358

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: alicetrillianosako@gmail.com (Schol-R-LEA)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Wed, 20 Mar 2024 21:00:20 -0400
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <utg0r4$1qdpg$1@dont-email.me>
References: <877chyiosp.fsf@tudado.org> <utetgj$1hs9g$1@dont-email.me>
<utft6a$1pfg9$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 21 Mar 2024 01:00:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e0a575d7620ab5e169a2a9922223a30b";
logging-data="1914672"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19BPWHv0xQ3goxGB+8RptYpGH2zxpeADsU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:hEkcAwBUJECFFMvivmpCoEGB9wk=
In-Reply-To: <utft6a$1pfg9$4@dont-email.me>
Content-Language: en-US
 by: Schol-R-LEA - Thu, 21 Mar 2024 01:00 UTC

Lawrence D'Oliveiro:
> On Wed, 20 Mar 2024 10:57:18 -0400, Schol-R-LEA wrote:
>
>> Languages such as C and C++ are interesting in this regard, as they have
>> only call-by-value semantics, but also support passing explicit
>> pointers, which allows them to simulate call-by-reference semantics by
>> the passing of explicit pointers.
>
> C++ allows “references”, where the “pointer” part is no longer explicit.
> E.g.
>
> ResType Func
> (
> ArgType & Arg
> )
> {
> ...
> } /*Func*/
>
> But of course this is not tied to function arguments at all, and can be
> used elsewhere, e.g.
>
> int A;
> int & const B = A;
>
> Now any assignment to “B” actually changes the value of “A”.

I had forgotten about C++ opaque references. Thank you for pointing that
out.

Re: on call by reference

<20240321180812.830e9559eb6b35aae14dc29b@cvine--nospam--.freeserve.co.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=359&group=comp.lang.scheme#359

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris@cvine--nospam--.freeserve.co.uk (Chris Vine)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Thu, 21 Mar 2024 18:08:12 +0000
Organization: A noiseless patient Spider
Lines: 90
Message-ID: <20240321180812.830e9559eb6b35aae14dc29b@cvine--nospam--.freeserve.co.uk>
References: <877chyiosp.fsf@tudado.org>
<utetgj$1hs9g$1@dont-email.me>
<uteu3o$1hsjh$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="5b11a2dfc45f170c0dbbda20d9274dfe";
logging-data="2485417"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+uGVGLD+6L2oABUY79Opjp"
Cancel-Lock: sha1:tY5j64dqkFF3FlDBj+6tOE4Mfvo=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-unknown-linux-gnu)
 by: Chris Vine - Thu, 21 Mar 2024 18:08 UTC

On Wed, 20 Mar 2024 11:07:36 -0400
Schol-R-LEA <alicetrillianosako@gmail.com> wrote:
> I apologize, I lost my train of thought for part of this:
>
> Schol-R-LEA:
>
> > In call-by-reference, what is passed is a pointer or similar reference
> > to the
>
> ...to the variable.
>
> In effect, a language in which call-by-reference is used, parameters are
> implicit pointers to the arguments. So, by comparison to C,
>
> void foo(int bar)
> {
> bar = 23;
> }
>
> in a call-by-reference dialect would be equivalent to
>
> void foo(int* bar)
> {
> *bar = 23;
> }
>
> in standard C.
>
> For obvious reasons, this presents problems with potential side effects
> and is harmful to modularity, as any change to the parameter variable
> would silently change the argument. This is why most languages which
> support call-by-reference at all do so explicitly, with call-by-value
> being the default.

However that analysis does not help you very much with scheme. Scheme
is call by value but for mutable entities it behaves like call by
reference, in that the thing passed by value is analogous to a
pointer. Scheme is call by value in the sense that all the arguments
of a procedure must be evaluated before the body of the procedure is
entered; and any "reseating" of an identifier within a procedure does
not reseat the reference viewed lexically outside the procedure (see
below).

Let's first deal with a preliminary issue. In scheme, set! does not
mutate any value. Instead it "reseats" an identifier name so that that
identifier refers to a different entity than the one it previously
referred to. The thing previously referred to is unchanged, except
that if no other identifier refers to it it might be garbage collected
as unreachable. Take this simple example:

(let* ([a '(x)]
[b a]
[change (lambda (arg) (set! arg 2))])
(write a)(newline)
(write b)(newline)
(change a) ;; outside the change procedure neither a nor b is changed
(write a)(newline)
(write b)(newline))

However entities which may be mutated are as if passed by pointer.
Here is an example of a list:

(let* ([a (list `x)]
[b a]
[change (lambda (arg) (set-car! arg 'y))])
(write a)(newline)
(write b)(newline)
(change a) ;; changes the list referred to by a and b
(write a)(newline)
(write b)(newline))

And here is an example of a vector:

(let* ([a (vector 'x 'y)]
[b a]
[change (lambda (arg) (vector-set! arg 1 'z))])
(write a)(newline)
(write b)(newline)
(change a) ;; changes the vector referred to by a and b
(write a)(newline)
(write b)(newline))

This is reflected in the way many schemes are implemented. Scalar-like
things, such as booleans, symbols and integers fitting within 31 or 63
bits are often "unboxed" or "immediate", that is they are not allocated
on the garbage collected heap. More complicated things such as lists
or vectors are usually "boxed". This arrangement is often implemented
by pointer tagging (https://en.wikipedia.org/wiki/Tagged_pointer).

Chris

Re: on call by reference

<uti7s3$2ed01$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=360&group=comp.lang.scheme#360

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Thu, 21 Mar 2024 21:12:36 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <uti7s3$2ed01$2@dont-email.me>
References: <877chyiosp.fsf@tudado.org> <utetgj$1hs9g$1@dont-email.me>
<uteu3o$1hsjh$1@dont-email.me>
<20240321180812.830e9559eb6b35aae14dc29b@cvine--nospam--.freeserve.co.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 21 Mar 2024 21:12:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="badb6633f042ee08dd03f65d8f49603e";
logging-data="2569217"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/l/W7e2yd/aPBqrB5U2B2j"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:rBRBUj1OpWR9Yx6yOzVqsUeKbD0=
 by: Lawrence D'Oliv - Thu, 21 Mar 2024 21:12 UTC

On Thu, 21 Mar 2024 18:08:12 +0000, Chris Vine wrote:

> ... but for mutable entities it behaves like call by reference ...

This has already been discussed. Only parts of the passed entity can be
mutated this way, it cannot be replaced with another complete entity as
far as the caller is concerned. Thus, it is still “call by value”.

Re: on call by reference

<20240321220243.442881d9c57a4505aca6816c@cvine--nospam--.freeserve.co.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=361&group=comp.lang.scheme#361

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris@cvine--nospam--.freeserve.co.uk (Chris Vine)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Thu, 21 Mar 2024 22:02:43 +0000
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <20240321220243.442881d9c57a4505aca6816c@cvine--nospam--.freeserve.co.uk>
References: <877chyiosp.fsf@tudado.org>
<utetgj$1hs9g$1@dont-email.me>
<uteu3o$1hsjh$1@dont-email.me>
<20240321180812.830e9559eb6b35aae14dc29b@cvine--nospam--.freeserve.co.uk>
<uti7s3$2ed01$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="5b11a2dfc45f170c0dbbda20d9274dfe";
logging-data="2594411"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/KlY8z5/xvCMA0yn2hVVrh"
Cancel-Lock: sha1:ndQQ2soOBaTn1lqPVEJYosTSWfU=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-unknown-linux-gnu)
 by: Chris Vine - Thu, 21 Mar 2024 22:02 UTC

On Thu, 21 Mar 2024 21:12:36 -0000 (UTC)
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
> On Thu, 21 Mar 2024 18:08:12 +0000, Chris Vine wrote:
>
> > ... but for mutable entities it behaves like call by reference ...
>
> This has already been discussed. Only parts of the passed entity can be
> mutated this way, it cannot be replaced with another complete entity as
> far as the caller is concerned. Thus, it is still “call by value”.

Which part of:

"Scheme is call by value in the sense that ... any 'reseating' of an
identifier within a procedure does not reseat the reference viewed
lexically outside the procedure ..."

were you disagreeing with?

Chris

Re: on call by reference

<util3t$2haq3$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=362&group=comp.lang.scheme#362

  copy link   Newsgroups: comp.lang.scheme
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.scheme
Subject: Re: on call by reference
Date: Fri, 22 Mar 2024 00:58:38 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <util3t$2haq3$2@dont-email.me>
References: <877chyiosp.fsf@tudado.org> <utetgj$1hs9g$1@dont-email.me>
<uteu3o$1hsjh$1@dont-email.me>
<20240321180812.830e9559eb6b35aae14dc29b@cvine--nospam--.freeserve.co.uk>
<uti7s3$2ed01$2@dont-email.me>
<20240321220243.442881d9c57a4505aca6816c@cvine--nospam--.freeserve.co.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 22 Mar 2024 00:58:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1d2811be6c706a5fb413e03faa778213";
logging-data="2665283"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Zt/natdIaQcFbY69EO4qL"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:a4HEMmnNih0CUgdfXD2j0jwAVYQ=
 by: Lawrence D'Oliv - Fri, 22 Mar 2024 00:58 UTC

On Thu, 21 Mar 2024 22:02:43 +0000, Chris Vine wrote:

> On Thu, 21 Mar 2024 21:12:36 -0000 (UTC) Lawrence D'Oliveiro
> <ldo@nz.invalid> wrote:
>>
>> On Thu, 21 Mar 2024 18:08:12 +0000, Chris Vine wrote:
>>
>> > ... but for mutable entities it behaves like call by reference ...
>>
>> This has already been discussed. Only parts of the passed entity can be
>> mutated this way, it cannot be replaced with another complete entity as
>> far as the caller is concerned. Thus, it is still “call by value”.
>
> Which part of:

The part I quoted.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor