https://kotlinlang.org logo
Title
v

Vsevolod Tolstopyatov [JB]

04/12/2019, 6:31 PM
📣 📣 📣
kotlinx.coroutines
1.2.0 is here! Changelog: * Kotlin 1.3.30 * New API:
CancellableContinuation.resume
with
onCancelling
lambda to consistently handle closeable resources. * Flow improvements, including new operators, better documentation and RxJava integration. Note that it is not leaving its experimental status yet. Full changelog: https://github.com/Kotlin/kotlinx.coroutines/releases/tag/1.2.0
😒uspend: 20
🎉 15
s

sdeleuze

04/12/2019, 8:19 PM
Congrats. Could you give us more details about the reasons of « flatMap, merge and concatenate are replaced with flattenConcat, flattenMerge, flatMapConcat and flatMapMerge. » ?
e

elizarov

04/13/2019, 7:42 AM
The chief reason is that we have conflicting evidence on what
flatMap
is expected to do (should it concat or merge), so this way we can defer making this decision.
s

sdeleuze

04/25/2019, 1:32 PM
@elizarov What about
concatMap
instead of
flatMapConcat
and
flatMap
instead of
flatMapMerge
?
e

elizarov

04/25/2019, 5:46 PM
That's a possibility if in the end we decide that
flatMap
should do
flatMapMerge
. The downside of that decision is that if you copy-and-paste a code written with
Sequence
to
Flow
then suddenly it starts working differently, because
flatMap
for sequences is
flatMapConcat
.