Earlier quoted context omitted.
It might be easier to answer if you explained why you think it would be better. There may be cases where by-reference (yes, that's an absolutely acceptable thing to say, even in C) is more efficient: If the struct is a kind of "this pointer" (as in object-oriented programming) that is passed to a bunch of functions but relatively rarely used , then passing it by reference causes much less register pressure. Passing i…
> There may be cases where by-reference (yes, that's an absolutely acceptable thing to say, even in C) I don't want to be nit-picking. But I would like to know why "by-reference" is an acceptable thing to say. When I learnt C, C++, Java, etc. I was repeatedly told that pass by reference exists only in C++. In C, a pointer is passed by value. In Java, a reference is passed by value. Doesn't calling "pass pointer by va…
You have no problem using the terms 'loop' or 'recurse' to describe C code, right? But these high-level ideas are implemented without using those terms in the code. Same with 'pass by reference'.