Skip to content

[Feature Request] Add a Result type to dart:core #61280

@rusty-snake

Description

@rusty-snake

I'm not going to outline the benefits of Result types in general here, you can find a lot resource in the internet (example).

Reasons why there should be a Result type in dart:core:

  • Standardization: Currently there are around a dozen implementations for Result types on pub.dev. This is a very split ecosystem with bad interoperability, different APIs and users spend a lot time on choosing "the right" package. Including at least the core classes in dart:core would standardize the type/class giving interoperability. Packages can adopt these types/classes and add own extensions for more opinionated APIs.
  • Easy access without extra package for simple usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions