4 ms·
Every language, every rule, every suggestion has exceptions and gotchas. That's just life, and programming in general. I can't think of anything significant of
by Night_Thastus 3y ago
Every language, every rule, every suggestion has exceptions and gotchas. That's just life, and programming in general.
I can't think of anything significant off-hand, it was just more to stave off this part from the post:
>If you take a parameter by non-const reference, the caller can only use lvalues to call your function. But if you take a parameter by const reference, the caller can use lvalues or rvalues. So some functions, in order to be used in natural ways, must take their parameters by const reference.
>I say let's make companies financially liable for the consequences of their preferences and see how this shakes out.
This is completely unrelated. It's also a bit of a dangerous road to go down and I'd suggest thinking about it a lot more.