|
|
|
|
|
by reikonomusha
1133 days ago
|
|
It is not true that "any mutation" causes issues. In fact, most idiomatic usage of mutation is problem-free and completely sound. One can find out more about polymorphic mutation as a "counterexample" to Hindley-Milner type inference on Wikipedia [1]. It's a well-studied problem with space of solutions. Purity, weak references, the value restriction, etc. are all ways of dealing with this shortcoming of Hindley-Milner. Interestingly, one of the first proposed solutions to this problem was suggested by Wright in the journal "LISP and Symbolic Computation" [2]. [1] https://en.wikipedia.org/wiki/Value_restriction#A_Counter_Ex... [2] https://link.springer.com/article/10.1007/BF01018828 |
|