News for hackers. Stuff that matters.
Re:Maybe Everything Is a Coroutine by DrDroop on Wednesday February 14, 2024 @06:47AM (#39368784)
I've been trying to learn more about algebraic effects and I want to use them for practical things. However it has been hard because although I understand at some level the theoretic reasons for using them, the actual day-to-day experience of using them is something else. I think the most popular effect library for a mainstream language is effect.ts, it is a nice library and it also uses coroutines but using it in some practical way isn't actually productive. I think a lot in the functional programming community get stuck on the f . g trap. As if function composition is the one thing you would want to do all day (even though you can), from a super practicle perspective it is often very little work to also write f' and g'.
Re:Maybe Everything Is a Coroutine by kriiuuu on Wednesday February 14, 2024 @08:29AM (#39369517)
If you want to look at a very mature and used in industry effect system take a look at Cats Effect 3 in Scala.