Re:Programming with Effects
by jakear on Sunday November 24, 2019 @01:31PM
(#21622281)
Is this fundamentally different from simply providing different implementations of a “Logger” or “Database” interface? Why does the involvement of side-effects result in the machinery being so different?
[ Parent
| on HN ]
Re:Programming with Effects
by lonelappde on Sunday November 24, 2019 @03:26PM
(#21623103)
That's what the OP is about: hiding implementations behind an interface.
Effects are different because side effects are impure which is not allowed by default in a pure language. Machinery is needed to hide the effects in effect-managing containers so they don't contaminate pure code.
I understand that, what I’m trying to understand is if there’s a claim being made that such machinery is especially desirable in this circumstance... is this claimed to be “the way you have to do it in pure languages” or “a really nice way of doing it, which is enabled by language purity”?