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?
-
Show this thread
-
-
Don't they just have locks on everything?
1 reply 0 retweets 0 likes -
Replying to @amccreight @kripken
No. They carefully ensure that slicing can never occur because arrays and interfaces are just one word. Go could have done this but was sloppy.
2 replies 0 retweets 4 likes
The basic problem is that if memory safety depends on values larger than a word remaining in sync multithreading becomes very tough. (Unless you’re like Rust and can ensure no data races in other ways.)
0 replies
1 retweet
9 likes
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.