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 : 27. Sep 2024, 23:26:51
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vd7bfd$t3v2$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 27.09.2024 23:03, Keith Thompson wrote:
[...]
In the function call, there are two different argument passing
mechanisms, but only one *call*. The call itself is not by
value or by reference. The call includes passing two arguments,
one by value and one by reference. This is one reason I don't
think it makes sense to use "call by" rather than "pass by"
for arguments/parameters. (In Algol 60 terms, parameters were
"called", so that terminology made sense.)
Just note that in Simula - which has Algol 60 as [small] subset -
the couple books I have also speak about "passing" parameters,
or speak about associating actual parameters to the formal ones;
depending on what abstraction level they formulate.
The "call by name" semantics turned out to be more complicated
than expected,
It's also inefficient (and it shows some IMO undesired effects).
and as far as I can tell was never adopted by any
language other than Algol 60.
Yes; Simula inherited that mechanism; it has 'value', 'name' (and
also, for objects of class T types, 'ref(T)').
Janis