Quote:
To keep a program readable, it is often best to avoid functions that modify their arguments.
Just avoiding functions that modify their arguments is NOT enough to keep a program readable. You have to stay away from using references as function parameters at all, const or not.Quote:
Well...basically that is the reason why I pass pointers while functions modify their arguments and const-references otherwise...
References are one of the biggest obstacle in code readability. They are implemented like pointers but they look like objects.
Especially when you pass it in to a function call. Is it pass the object by copying, or is it passed by reference? You never know.
Also keep in mind references do NOT guarantee it actually point to a valid object. It may force you to always initialize when declare reference, but you could initialize it with the wrong thing or even a null pointer.
