4 ms·
You peek only one thing here. https://docs.rs/stm/0.1.2/stm/ https://docs.rs/stm/0.1.2/stm/ - the user of STM must checks for the absence of side effects, not
by thesz 6y ago
You peek only one thing here.
https://docs.rs/stm/0.1.2/stm/ https://docs.rs/stm/0.1.2/stm/ - the user of STM must checks for the absence of side effects, not the compiler.
How about that? Will Rust compiler be able to prevent user from executing side-effecting code in STM context? Will user of Rust compiler have the same ease as with Haskell's monads?
- masklinn 6y ago> How about that? Will Rust compiler be able to prevent user from executing side-effecting code in STM context? Rust is not a pure language so no, side-effects are not part of the type-system at all.
- thesz 6y agoSTM internally side-effecting thing. Stream processing over I/O is also side effecting thing. The point is that one should not mix and match arbitrary stream processing with arbitrary STM transactions. One should have control over when and where and compiler should prevent incorrect use (just like with borrow checker).