2 ms·
Aren’t these problems better resolved by linear types and alike? Successful implementations were made in several languages now.
by rq1 4y ago
Aren’t these problems better resolved by linear types and alike?
Successful implementations were made in several languages now.
- dan-robertson 4y agoI guess you still want well-defined semantics even if most users use some modes-based or other high-level api. Eg normal rust code gets to be ‘data race free’ but low level implementations of eg Arc could be racy if they were incorrect. But maybe the OCaml thing is more than just doing a good job of specifying semantics and there is some overhead in generated code because of it. I confess I haven’t looked into the details.
- tomp 4y agoCan you name a single successful implementation that can e.g. implement modern concurrent lock-free data structures without using `unsafe`?
- ghostwriter 4y agoATS has it [1], you can safely implement lock-free queues and ring buffers in it. [1] https://ats-lang.sourceforge.net/DOCUMENT/INT2PROGINATS/HTML/c3811.html https://ats-lang.sourceforge.net/DOCUMENT/INT2PROGINATS/HTML...