4 ms·
This particular discussion wasn't about ruling out data races (although, of course, that is important too). It was about ruling out trying to read a list of str
by catnaroek 9y ago
This particular discussion wasn't about ruling out data races (although, of course, that is important too). It was about ruling out trying to read a list of strings from a reference cell containing a list of ints.
- johncolanduoni 9y agoYou're the one who brought up threads as a reason runtime monomorphisation doesn't work. If access to the list is properly synchronized, then what I proposed works just fine (you get your runtime error in whatever thread accesses the list second). If it's not, then unless you're using a concurrent data structure you're already screwed. The type system will at most change exactly how you get screwed.