Sujet : Re: technology discussion → does the world need a "new" C ?
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 13. Jul 2024, 10:46:34
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v6tidr$3hj4d$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 13.07.2024 06:04, Keith Thompson wrote:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
On 12.07.2024 15:59, bart wrote:
[...]
So how are the elements of the caller's array accessed?
>
No copies have been supplied to the caller. So access is by ... ?
>
...by an implicit pointer value dereferentiation and a global
access to the pointed to storage area.
A small quibble: I suggest "indirect" would be clearer than "global".
I used the term "indirection" before a an abstract description
of the common superset of the function that "references" and
"pointers" provide.
But, yes. Global is not a good word. (It itches me as well.)
Here I wanted to include (in a subtle way) another aspect (that
had already been mentioned before by others, granted); that the
change through indirection is not bound to some sort of "local"
parameter object (an array passed as parameter by value), but as
pointer may point just to (and manipulate) any "global" data.
For example, a function can define a local array object and use
its name as an argument in a call to another function.
[...]
As an end point to the discussion (just for some recreational
reading) I suggest "The Development of the C Language" by D.
Ritchie.
Available at <https://www.bell-labs.com/usr/dmr/www/chist.pdf>.
Thanks for the link. (I had only a local copy of it.)
Janis