Immutable code

Published: Jan. 31, 2017, 1:24 p.m.

When is a good moment not to change an existing code but instead write a new module/class and replace it, in the spirit of immutability?