Hi guys, have you considered keeping `Try`? > `...
# arrow-contributors
d
Hi guys, have you considered keeping
Try
?
'Try<out A>' is deprecated. Try will be deleted soon as it promotes eager execution of effects, so it's better if you work with Either's suspend constructors or an effect handler like IO
I do not think that its existence promotes eager execution of effects. This is how
Try
works and simetimes it is what you want. I tried to replace it with
Either.catch
but then I have to run it with
runBlocking
and it looks strange.
👍 1
🙏 1
r
Try promotes eager effects and it’s less efficient than try/catch which is also an expression. Try fires effect on it’s constructor which also calls Throwable.fillInStackTrace and that is indeed an effect