Isn't effect deprecated? `public inline fun <R,...
# arrow
d
Isn't effect deprecated?
public inline fun <R, A> effect(@BuilderInference noinline block: suspend Raise<R>.() -> A): Effect<R, A> = block
or is it only partially being deprecated?
s
EffectScope/EagerEffectScope
is getting replaced by
Raise
, but this also meant it had to move package from
arrow.core.continuations
to
arrow.core.raise
to avoid conflicts in names and signatures.
Effect
is no longer an
interface
but a simple
typealias
for
suspend Raise<E>.() -> A
and that comes with a significant amount of runtime performance benefits. Similarly
EagerEffect
is also no longer an
interface
but also a
typealias
for
Raise<E>.() -> A
. The reason for
effect { }
is so that it can automatically infer
R
using
@BuilderInference
. Using regular lambda syntax is not able to do that.