I work with a developer who defaults to passing reference types such as StringBuilder, string and MemoryStream using the ref keyword. They do this regardless of whether they need to actually change the reference itself.
public void ExampleMethod(ref MemoryStream ms)
{
byte b=ms.ReadByte();
...
// No changing of actual ms reference such as: ms=new MemoryStream();
}
Almost always, the methods just use the object and return without changing the reference in any way. For the immutable types ie string, this is sometimes necessary, but why for the mutable types?
To me this has a bit of a "code smell" in that it could lead to less maintainable code in that it is more permissive than what it really needs to be.
However is this something that is serious enough for me to bring up with the developer? My intial feeling is yes, but maybe this is too pedantic?