3 ms·
I agree, Monads don't solve everything, but if we're being pedantic then I would argue that in a functional context you would almost never write fn doTheThing(
by zactato 3y ago
I agree, Monads don't solve everything, but if we're being pedantic then I would argue that in a functional context you would almost never write
fn doTheThing() -> void, raises Error
SomeVal x = try doSomethingFallibly()
Functions don't do things, they process and return things. Side effects are handled higher up at the root of a program. Generally any time you'd be "doing a thing" you'd also be in a position to handle the error.
source: I don't do any functional programming but have seen some videos on youtube