Learning the advantages of non-mutating objects when writing concurrent code