this post was submitted on 02 Sep 2024
0 points (50.0% liked)
Android Development
477 readers
8 users here now
Welcome to the programming.dev Android development community!
The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I think you're giving it to much thought, a nullable type is also a optional.
But using orNull() to unwrap the option kinda defeats it's purpose, you're just making it into another optional type, If that is the case then I would stop using Option and use the nullable operator "?".
When I've worked with arrow I usually wrap types with Either so I can failfast and only have happy path in my code.
https://arrow-kt.io/learn/typed-errors/either-and-ior/