If you define your objects as structs then everywhere they go, they remain unchanged and any attempt to change one of their fields’ values directly will result in an error. It is possible to change the value within a collective field, e.g. within a struct that has a field that is a vanilla vector, one could alter the ith entry indirectly. Julia has some kinds of vectors that do not allow this, they are most appropriate for vectors of < 100 elements or so.