Conversation

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
7
108
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
OTOH, `throws`/`rethrows` is also a rump effects system, and a bunch of seemingly-inevitable features like pure, async, constexpr, etc. all fit neatly into an effects model. At some point it becomes simpler to manage them as a system instead of a pile of one-off features
2
9
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
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