Marie Kondo: What is this?
Me: A generalized algebraic effects system
MK: Does this proposal fit well with the feel and direction of Swift?
Me: …
…
…
well, it mi—
MK: You know what to do
Conversation
Well, you should either go with this, or a full generalization of exceptions to conditions+restarts, which are the dynamic dual to algebraic effects with handlers.
2
1
I really want to, but I'm deeply wary of increasing the conceptual size of Swift further. It's already a very large language for various interop/expertise-transfer reasons.
It's likely doable but would/will require extreme care.
1
2
Rust went through exactly the same thing with typestate, for what it’s worth. (Namely: It got folded into the other substructural type system feature we had, unique types.)
2
2
More! Rust had/has a baby effect system too (kept "unsafe", dropped "io" a.k.a. "impure", but gained "const" so ???)
The purity tracking was there to let you use pure fns as n-ary typestate predicates, of course, so that bit in the lattice died with it.
2
14
Oh man, it's nice seeing prehistoric Rust again. I miss some of the language from back then. Sometimes I think it'd be interesting to resurrect ~2011 Rust and see if it develops again along a similar path.
1
1
Oh man, these days I _wish_ I had an effects system in Rust... :3
Need to get more things working in const fns these days (as a start)






