
Programming with Effects - luu
http://www.matfournier.com/2019-07-25-effects/
======
theCodeStig
Although, I'm familiar with the concepts; I posit that the examples in the
post are too general. Due to the generality of the examples, the concepts may
be difficult for beginners to pick up, or to see any benefit. I suggest the
(free) book Scala with Cats as an alternative.

------
rossmohax
how often does it happen, that you'd want to swap effects without changing
program code? I don't think it is a strong selling point.

As someone who is interested in FP, but still at the beginning of the journey,
I found the blog post interesting to read, especially intuition for every
Monad.

~~~
mrkeen
I replaced one type of Future for another in a large Java codebase. Not
productive.

I had a colleague who wanted to rewrite the same piece of code using
Observables instead.

Later in a different company I met someone who was working on the exact
opposite, i.e. taking Observable code and rewriting it as Futures because
"observables are confusing".

Just extract these things behind an interface and call it a day.

~~~
AzzieElbab
futures have a lot of gottyas that make them hard to replace. for example,
where and how you initialize them matters

------
lonelappde
What's the value in paying the cost for an HTML rendering but rendering text
in a monospace typewriter format? This "techie" affectation farms readability.

------
zozbot234
In a typical PL context "effects" is always short for _algebraic_ effects, and
this article doesn't address those at all. Downvoted due to misleading title.

~~~
curryhoward
> In a typical PL context "effects" is always short for algebraic effects

The word "effects" has a long and storied history in programming language
theory that predates algebraic effects/handlers by decades. The study of
effect systems includes algebraic effects but also monads and other type and
effect systems. In some situations the lines between these are blurred, for
example with "extensible effects" which are algebraic effects implemented by a
free(r) monad combined with "data types a la carte"-style open unions.

