On Tue, 26 Mar 2024 at 04:08, Tony Wallace wrote:
I totally support this move. As a functional programmer this makes
sense. If a bit set operation updates variable for example, this can
be achieved with an assignment to the return value of the function.
You also "totally" ignored my response.
I used VAR parameters in the set bit and clear bit procedures.
They are supposed to be destructive.
And yes, that is for efficiency, because if you use a function
and then assign the result to the original operand, this would
result in an additional unnecessary copy operation. If you use
low-level operations like setting and clearing individual bits,
there may be quite a lot of bit operations in an inner loop and
then the copying will add up. And the uses cases for such
operations are mostly destructive anyway.
I trust this clarifies.
benjamin