5 ms·
> Does using this construct allow me to put some things in the "that doesn't matter here" bin I've been doing this year's Advent of Code in Unison (https://uni
by sigwinch28 4y ago
> Does using this construct allow me to put some things in the "that doesn't matter here" bin
I've been doing this year's Advent of Code in Unison (https://unison-lang.org/ https://unison-lang.org/, no affiliation) and I've found the form of algebraic effects used there (Abilities in Unison parlence) great for "that doesn't matter here".
For example, the `Abort` ability allows me to stop control flow deep down inside my code at without having to "thread" a bunch of monads or Maybes or Eithers through all the intermediate layers.
In one case I also used the `Store` ability to accumulate some metadata about a simulation as it progressed without having to "pollute"[^1] all of the intermediate layers with explicit handling of the metadata.
[^1]: the abilities do appear in the type signatures, though.
https://www.unison-lang.org/learn/fundamentals/abilities/ https://www.unison-lang.org/learn/fundamentals/abilities/
https://share.unison-lang.org/@unison/p/code/latest/namespaces/public/base/latest/abilities/;/types/Abort https://share.unison-lang.org/@unison/p/code/latest/namespac...