Liste des Groupes | Revenir à cl c |
bart <bc@freeuk.com> writes:And yours (plural as it's not just you) is also to annoy with pointless pedantry.
On 11/07/2024 12:49, Tim Rentsch wrote:You have proven once again that your goal is not to inform
>bart <bc@freeuk.com> writes:>
>According to what people have said, C would STILL be a language that>
passed thing by value, and never by automatic reference.
First, the scheme that you outline is either dumb or disingenuous
(or perhaps both).
>
Second, the argument you're making is purely ad hominem: it
isn't about what is true but about what it is people will say, or
at least what you think they would say.
>
Third, none of this changes the underlying reality. Whatever
people might say about your hypothetical scenario, or whatever it
is you think they would say, it doesn't alter the fact that in C
all function arguments are passed by value, and not by reference.
People don't write software based on the the precise, pedantic details
of what a language reference says, which are always to use the same
carefully selected set of terms.
>
They want to write programs that do useful tasks.
>
If that task calls for a function that manipulates arrays as though
they were passed by reference, then, guess what, they will use a C
function that the standard says always passes things by value.
>
For that purpose, in the mind of the user, it does the same job as 'by
by reference'. That it does so by some other quirks (array decay, and
the ability to index pointers as thought they were arrays), is by the
by.
>
I understand that in this newsgroup, most posters are only interested
in what the Standard says and little else, and will pounce upon any
turns of phrase, any nomenclature, that deviate even slightly from
what it says in that document.
>
I also understand that this is not comp.std.c
>
Meanwhile, the internet abounds with quotes like this about C:
>
"When we pass the address of an array while calling a function then
this is called function call by reference."
>
"Basically, in C, function parameters that are arrays are passed by
reference, by default."
>
Yes, I get that such lax informality would annoy the people here.
but to annoy. Congratulations. Mission accomplished.
Les messages affichés proviennent d'usenet.