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, 11:13:09
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v6tjvm$3htha$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 23 24 25 26 27 28 29 30 31
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 12.07.2024 16:44, bart wrote:
Pass-by-reference can mean almost anything. Many languages and their
implementations are too diverse for it to have a precise meaning.
The language diversity has nothing to do with the comparably small
set of parameter passing mechanisms. There's thousands of existing
languages but only a handful of parameter passing mechanisms that
are used. (I posted a link recently; have you inspected it before
writing your post?)
And "pass-by-reference" or "call-by-reference" can not mean "almost
anything"; they describe a principle way how parameters are passed
by reference.
What you probably mean is that a colloquial "reference" (a homonym)
may have more than one meaning and interpretation. - Luckily in CS
folks try to strive for unambiguity.
There's concrete variants of parameter passing mechanisms in one
way or another, but that doesn't make "by reference" mean something
different. It's still precise enough. YMMV
All you might assume about pass-by-reference is that the data you're
accessing has not been passed by value!
This is an odd formulation, but here you're actually now speaking
about the concrete parameter passing mechanism. Any you are right
that pass "by reference" is different from pass "by value", but
that's not all I "might assume". The "by reference" model forms
a quite concrete image in my mind that is reflected by the CS
literature I read in the past decades.
In Python [...]
I don't consider that [...]
My dynamic language allows [...]
Thanks.
Janis