F#: let mutable vs. ref
I can only support what gradbot said – when I need mutation, I prefer let mutable. Regarding the implementation and differences between the two – ref cells are essentially implemented by a very simple record that contains a mutable record field. You could write them easily yourself: type ref<‘T> = // ‘ { mutable value … Read more