Originally posted by Randall Twede:
just because it makes it more clear what is going on: that the variable is being modified by the method. thats why im asking, because i realized i dont have to pass that parameter.
I find it likely that not using the argument makes for code that communicates better.
When a method calls another method, ideally those two methods are at different levels of abstraction - the caller contains the more abstract logic, the callee the less abstract details.
In your example, one could imagine a method
This method tells us at a very nice abstract level what is happening - something is moved and after that collisions are processed. When I'm looking at this method, this might be all I'm interested in, any additional detail just obscures this view.
When I want to know how this works in detail, I can look at the implementation of such a method. When I look at processCollision(), I actually *want* to know what exactly this is doing. Not directly accessing the field here actually hides this important fact from me - I need to use additional brain cycles to find out what the real impact of this method on the object is.
This is to a large part speculation from my side, though - well educated speculation, but still speculation. I had to see more of the code to really decide this for me.
I hope that showing you my reasoning helps you come to your own conclusion, though.