3 ms·
Isn't it about time we let go of the distinction? I get that C++ is a lost battle, but moving forward. What I'm really interested in is whether an argument is
by codr7 7y ago
Isn't it about time we let go of the distinction? I get that C++ is a lost battle, but moving forward.
What I'm really interested in is whether an argument is allowed to be modified by the function or not. I'm pretty sure the compiler has a better chance of making the right decisions concerning performance. Especially considering how best practices morph as languages/compilers evolve.
Go has the same issues, I'm at the point where I'm mostly passing anything that's not supposed to be modified by value. Notable exceptions are interfaces, which need pointer receivers to work for reasons.