I see code like this in our codebase: `}.mapLeft {...
# arrow
m
I see code like this in our codebase:
}.mapLeft { throw it }
(on Either<Throwable, A>). Is this or should be part of the lib? I can't find out what rethrow() does, if it it is the same. Or something like getOrThrow.
s
from what I remember the idea is not to expose unsafe (not RT) APIs in arrow itself. You can always add that yourself as an extension function
☝️ 2
m
Oki
s
Yes, since we want to keep the Arrow libraries pure we're not exposing unsafe APIs. If there is enough demand maybe someone is interested in making and maintaining an
Arrow-Unsafe
or something similar in line with Scala's
alley-cats
which exposes unlawful code.
👍 1
m
It's mostly to operate with Java APIs that require exception throwing.