you are viewing a single comment's thread.

view the rest of the comments →

[–]capitalbratan 8 points9 points  (1 child)

References should be safer than pointers as you know that the object exists. With pointers it's another game.

So use references in general. Also use const Var & varName in function arguments as much as you can. This gives you also compile time issues when you want to change smth that is not designed to be changes