[TUHS] C declarations.

Random832 random832 at fastmail.com
Sun May 14 05:05:24 AEST 2017


On Sat, May 13, 2017, at 08:20, Michael Kjörling wrote:
> Correct me if I am wrong, but _pass by value_ as opposed to _pass by
> reference_ requires making a copy, no? That's the whole point, to
> allow the callee to poke at the value it is given at will.

If that were the issue, the callee could simply automatically make the
copy if-and-only-if it needs it.

The reason that it can't be done without making a copy is, rather, that
there might be some *other* reference in play, through which the
original array could be modified (thus improperly changing what the
callee sees).


More information about the TUHS mailing list