Need good, guaranteed fusion of handlers like iterators enjoy in Rust before they are viable for a Rust-like language. The future is exciting though!
Conversation
do you have good examples of this? I have to admit I’m not familiar with effects and handlers, although I’ve noticed recently more and more haskell devs talk about effects
1
1
I'll see if I can dig some up. As horrific as this sounds, think: "generalised exception handling". Effects are treated as things that you 'throw' and are handled somewhere else, potentially throwing new effects. All tracked in the type system.
2
1
So I could define a 'Log' effect with a constructor 'trace'. Then my application code could potentially do logging, but it's up to the top level caller of the application to do something with those thrown effects, potentially logging to standard out, or a file.
1
1
Similar to the condition system in the Common Lisp and Dylan languages.
1
Oh, haha, Rust used to have a condition system 😂
1
The punchline to this sad story is that there’s already enough machinery to express the fast & ubiquitous cases via implicits, and rust has no more (cognitive) room in its static type system for more degrees of polymorphism to handle the exceptional cases.
2
1
4
I am feeling dumb today ... what would be implicits in the context of Rust?
1
I'm guessing something like OCaml's modular implicits?
1
Traits and impls.
1
Yeah... which is what Rust went with in the end. For better or worse. 😕
This Tweet was deleted by the Tweet author. Learn more
It’s sooo nice ... I’m propping up interface files onto frontend GUI components, with a single ‘include’ of the component module type, and presto—they’re all enforced as the same type of component ☺️
2




