Re:Where Do Type Systems Come From?
by catnaroek on Sunday July 09, 2017 @12:20AM
(#14728349)
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.
[ Parent
| on HN ]
Re:Where Do Type Systems Come From?
by johncolanduoni on Sunday July 09, 2017 @12:40AM
(#14728399)
You'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.