P
pugnatio2
Hi, Does anyone have an opinion as to whether functions/methods should
return mutable or immutable objects? In some circumstances, I could
see that mutable objects might be more convenient, but if the function
is to be reused, it might be a good idea to return only immutables.
Or is this question moot, since the function returns control to the
caller and is out of the picture at that point?
Thanks,
--p
return mutable or immutable objects? In some circumstances, I could
see that mutable objects might be more convenient, but if the function
is to be reused, it might be a good idea to return only immutables.
Or is this question moot, since the function returns control to the
caller and is out of the picture at that point?
Thanks,
--p