4 ms·
That depends on the semantics. If the function returns the Person object with a particular name (obtained from an expensive dB query) then you want the mutated
by geysersam 3y ago
That depends on the semantics. If the function returns the Person object with a particular name (obtained from an expensive dB query) then you want the mutated Person returned, not the now stale value that was returned on the previous call to the function.