Skip to content

Nullable success #23

@TheManuz

Description

@TheManuz

Hello,

I wanted to open a discussion on nullable Success Result (again).

Consider an API like

Person? searchUser(String name)

If I want to convert this to ResultDart, the result would be something like

ResultDart<Person, PersonNotFoundException> searchUser(String name)

-Person is not nullable anymore

  • not finding a Person was a valid output in the original API, now it must be modeled with a specific exception
  • if the API also throws other exceptions, it gets less explicit, because the return type become just ResultDart<Person, Exception>.

I know that there was already an issue (#13) discussing this feature.

I was wondering if, almost a year later, there is room to discuss and maybe develop this feature.

Thanks for your attention!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions