New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
["Request"] Keep the traverse
function
#3108
Comments
Hey @victorhearnyeates, Thank you for your feedback. The replacement code in Additionally, it's not really being removed but it's been moved to a different library. https://github.com/cashapp/quiver. I'm not sure there is a way to configure Gradle to ignore certain deprecations, but if you want to continue using Does that seem like an acceptable solution to you? Thank you for the feedback, it's great appreciated 🙏 Looking forward to your thoughts. |
I can feel you, @victorhearnyeates, as my initial thoughts were similar. But having spent more time, my code looks so much cleaner now - you cannot rely on the simple "replace with" automatisms. In my code, I am now using the Raise DSL extensively and believe me, it looks better than before without dealing with |
I agree with @victorhearnyeates. I don't consider Given this is my first time participating in discussions about Arrow, I'm missing some context about why these deprecations are occurring. What's the concern with leaving In a wider discussion for deprecations, it's an extra burden on developers who use Arrow to import an entirely separate ecosystem of dependencies ( |
Let me give my two cents. As @Zordid mentions, the direct replacements give you really terrible code (for example, you would never use either {
listOfSomething.map {
withError({ NotFoundError("Couldn't find thing $it") }) {
somethingThatReturnsAnOption.bind()
}
}
} or use the provided either {
listOfSomething.map {
somethingThatReturnsAnOption.toEither { NotFoundError("Couldn't find thing $it") }
}.bindAll()
} Apart from a few order changes, the main change here is that you need to write There are two reasons why I think
In addition to those, you may not need the |
On the note above, remember that in languages like Haskell or Scala you have a single declaration of |
The final decision was to keep the deprecation for 2.0, Quiver is the way to go if you need those functions. |
What version are you currently using?
1.1.5, just upgraded to 1.2.0
What would you like to see?
I use traverse extensively, and find it much cleaner when manipulating nested monads. I'm not sure why it's being considered a niche API, as it's incredibly powerful as
is so much cleaner than
It's a massive draw for arrow, and I'm not sure why it's be removed
The text was updated successfully, but these errors were encountered: