doesn’t feel a bit odd using the Raise api with co...
# arrow
m
doesn’t feel a bit odd using the Raise api with context params? with context receivers was feeling way more natural IMO
Copy code
context(raise: Raise<DomainError>)
fun <T> HttpClient.getSomethingFromNetwork(): T = with(raise) {
    // network operator | raise(DomainError)
}
not sure if that’s the only way tho , but it feels odd the need to scope raise now 😕
a
three options here: 1. just use
raise.raise
instead of just
raise
for now 2. create your own
context(raise: Raise<E>) fun <E> raise(error: E) = raise.raise(error)
function 3. wait for the upcoming
arrow-raise-context
library
🎉 1
m
yeah, I was experimenting with raise.raise but I some times cant to use the
catch
one making it less intuitive to use. 2 seems a cool option! 3 ideal, nice