2 ms·
The interactions of "generalized effects" with the Rust affine types and tne borrow checker are quite non-trivial. This explains why Rust does not use effects
by zozbot234 4y ago
The interactions of "generalized effects" with the Rust affine types and tne borrow checker are quite non-trivial. This explains why Rust does not use effects better than any explicit choice; building an effect system that works naturally with the language is a research-level question that hasn't been tackled as of yet.
- benreesman 4y agoIt’s unclear from your comment if you’re talking about what Haskell calls “applicative” effects (sequenced but independent in which subsequent computation) or “monadic” (sequenced but the previous effectful computation can determine the next). Linear and affine typing do in fact interact, and yes there’s been a ton of research on it, the papers are there for anyone to read. And if Rust was marketed as a promising research vehicle, then have at it! But it’s not, it’s marketed (very successfully or I wouldn’t care) as “and you will do nothing, because you can do nothing”. Affine typing can get fucked compared to big sloppy arenas if that makes it easier to mutate a variable without talking to the network. That’s a bigger safety and correctness concern full stop. People talk about Rust and it’s borrow checker like it’s the x86_64 ABI or something: it’s not. It’s a vocal and enthusiastic community with non-trivial but still-optional buy-in at the big shops. We can still collectively just ditch it if we want. The borrow checker is still asking for permission to exist: C textual header includes are asking for foreguveness.