as well, on zip’s syntax ```eitherA.zip(eitherB, :...
# arrow
m
as well, on zip’s syntax
Copy code
eitherA.zip(eitherB, ::fn)
Is an alternate syntax like below also planned to be supported?
Copy code
Either.zip(eitherA, eitherB, ::fn)
for instance, in reactor you have both
Mono.zip(monoA, monoB, ::fn)
and
mono.zip(other, ::fn)
👍 1
s
A decision was made to follow Kotlin Std here, which only exposes
mono.zip
(see Collections API). I personally do like
Mono.zip
but it’s seems to be an uncommon pattern so far in Kotlin.
Tbh I’m very curious what the “namespace” feature is about. This was discussed in one the of the future of Kotlin videos by Roman. Let’s see if I can find it.

https://youtu.be/MBKxQcAxLhk?t=206

👀 1
This might open the door to add things like
Mono.zip
but in a more lightweight way. The biggest concern we currently have is that the API footprint will become too large. Which is something that Kotlin does quite differently to what we’re used to from Project Reactor or RxJava (which aims to be more all-utils-included).
m
ah yeah i remember that Static Extensions feature now
s
Arrow is a bit in between. It wants to be “all-utils-included” (in a micro-library way, so similar to Project Reactor or other FP like eco-systems in Scala/Clojure) but it also wants to safeguard what we like about Kotlin which is simple, straight-foward APIs & typically avoiding too many duplications in the APIs.
👍 2
So, it’s definitely something we can keep in mind. So to that end feel free to create a ticket 🙂
m
I’d be keen to watch and see currently, it’s syntactic so it’s not really something that’s blocking anything. I won’t open ticket if the current state of it is still being discussed internally.
i do like the way arrow tries to approach it as a companion to kotlin stdlib
so i think as the stdlib evolves, we might have more data point as to how to evolve the syntax. if the stdlib doesn’t do it now, maybe we shouldn’t
s
discussed internally.
There is not really any “internally” 😄 Everything is discussed public-ally. Feel free to also open a discussion on the Arrow repo on the “discussions” page 😉 That way it’s not an “issue” but still a more open discussions where everyone can participate.
👍 1
And thanks for the feedback! Always love hearing / discussing things like this to move Arrow forward together as a community 🙌