Liste des Groupes | Revenir à cl c |
On Fri, 16 Aug 2024 02:18:15 -0700This seems to about what happens when a language has complex, two-level types where you have a descriptor, which has a pointer to the actual data.
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
Michael S <already5chosen@yahoo.com> writes:Yes!
[...]IMHO, C++ is a particularly bad example.>
Yes, C++ has call-by-reference misfeature. But arrays in C++ are
2nd class citizen, same as in C. They can't be assigned and can't be
passed to callee, neither by value nor by reference.
>
Also, I suspect that if you ask Ken Thompson, he will tell you that
C++ does not really have 'call by reference'. Instead, it has
references as 1st class object, so, naturally, values of references
can be used during 'call by value'.
I have enough of respect to KT to consider that his POV is not a
nonsense.
Is that an attempt at proof by authority?
Not only does Ken ThompsonYes, but it's not baseless.
have very little to do with C++, but you're basing your conclusion on
what you *suspect* he would say.
>
It is based on following section Go language FAQs that I assumed to be
either authored or approved by KT.
https://go.dev/doc/faq#pass_by_value
Les messages affichés proviennent d'usenet.