4 ms·
> 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
by 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).