Thinking about how to make Go memory safe without using atomics everywhere: 1. Double bounds check slice indexing: i.e. store length of backing store on heap and check it. 2. Box interface types on heap. 3. Implement maps in Go with no unsafe. I think this works?
-
-
So there’s no way for the length to become out of sync unless the array storage itself were to be deallocated and reallocated, but that can only happen during the sweep phase of GC, which guarantees no more pointers to the array by construction and therefore no races.
-
Interesting, thanks!
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.