2 ms·
> full algebraic effects in Rust? Isn't that what the "keyword generics" initiative is all about? The Rust dev team seems to be quite aware that algebraic eff
by zozbot234 4y ago
> full algebraic effects in Rust?
Isn't that what the "keyword generics" initiative is all about? The Rust dev team seems to be quite aware that algebraic effects in Rust might be desirable, but coming up with a good design might involve quite a bit of work. It took a long time for even the async MVP to shape up properly, and supporting full effects might be even more complicated.
- satvikpendem 4y agoNot exactly [0]. The keyword generics initiative is constrained, it is not a full effects system. It is akin to GATs versus HKTs, a limited form of a more full feature, but I still think the full versions would make the API cleaner than the more limited implementations now. Again, this is with me not knowing how it'd work with the borrow checker, but like saurik mentioned above, I think there is a way to have a Rust-like language that could embody all of these full-feature aspects cleanly. [0] https://blog.rust-lang.org/inside-rust/2022/07/27/keyword-generics.html#q-are-you-building-an-effect-system https://blog.rust-lang.org/inside-rust/2022/07/27/keyword-ge...
- zozbot234 4y agoThe blogpost just says that they're trying to minimize surface area and not expose things like e.g. user-defined effects. That's normal for a MVP where we don't even know how such custom effects might interact with the rest of the language. If it turns out that they can be modeled "cleanly" as you say, they can be added quite easily in the future.