Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

orNull API to cover the deprecated Option API. #120

Closed
nomisRev opened this issue May 21, 2020 · 0 comments · Fixed by #191
Closed

orNull API to cover the deprecated Option API. #120

nomisRev opened this issue May 21, 2020 · 0 comments · Fixed by #191
Milestone

Comments

@nomisRev
Copy link
Member

orNull is a common API in Kotlin in contrast to Option.
If we are to deprecate Option as planned in #114 then we should also provide alternative APIs for the current Option APIs.

Option or ? is used to make unsafe APIs safe, or to indicate absence/terminal operations.

  • headOption -> firstOrNull
  • tailOption -> lastOrNull
  • mapFilter -> mapNotNull
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant