Result Roadmap This page summarizes the current and planned capabilities for the Result
abstraction. The authoritative, most granular source is the repository root file ResultFeatures.md
. This page is updated periodically and focuses on highβsignal planning items.
Legend β
Implemented Β· π In Progress Β· β High Priority (next 1β2 milestones) Β· π Planned Β· π€ Considering
Phase Overview Foundation (β
complete) Core Expansion & Error Model (β
complete) Inspection & Value Access (π ToString enrichment in progress) Async Parity & Composition Refinement (β upcoming: TapErrorAsync, MapErrorAsync, MapErrors, TapBoth) Collections & Aggregation Enhancements (π error grouping, merge helpers) Interop & Language Integration (π factory helpers, implicit success lift) Resilience & Policies (π retry, timeout) Performance & Memory (π struct variant, shared success instances) Domain & Tooling Extensions (π analyzers, source generation) Documentation, Testing & Benchmarks (π debugger display, cookbook, benchmarks) Recently Completed Highlights Structured reason model (IReason
, IError
, ISuccess
) with result-level and reason-level metadata Domain error records: NotFound, Validation, Conflict, Unauthorized, Exceptional, SuccessReason Enrichment helpers: WithSuccess
, WithError
, WithErrors
, WithMetadata
(dictionary / single / params tuple) Multi-arity results with generated introspection helpers (ToNullable
, TryGet
, deconstruction) Core functional operators (Bind, Map, Ensure, Try, Tap, TapError) + async counterparts Active / Next (Short Horizon) Item Status Notes Value-fold Match<TOut>
β Complete symmetry with action-based Match
ToString enrichment π Add first error code + compact metadata preview Error wrapping helper π Map Exception β domain error record Prepend/Append error transformers π Message shaping utilities EnsureNotNull / EnsureNotEmpty π Convenience validation errors (ValidationError)
Async Parity (Upcoming Batch) Item Status Goal TapErrorAsync β Observe async side-effects on failure MapErrorAsync β Normalize async error transformation MapErrors β Batch transform aggregated errors (future multi-error support) TapBoth / TapEither β Symmetric observation for success/failure branches BindTryAsync π Async factory with exception capture
Aggregation & Analysis (Planned) Feature Status Purpose Errors() / AllErrors() β Enumerate error reasons directly Merge β Combine maintaining success reasons & union of error metadata GroupByErrorCode β Quick diagnostics / reporting SummarizeErrors π Human-readable aggregated summary
Interop & Language Integration Feature Status Purpose FromNullable / FromCondition β Lift conventional patterns into Result FromValidation π Bridge validation libraries Implicit success lift (T β Result) β Reduce ceremony in pipelines ASP.NET Core mappers π Map Result β standardized HTTP responses ToOption / FromOption π Interoperate with Option type
Feature Status Purpose Retry / Timeout policies β Declarative execution wrappers returning Result Struct Result variant π Allocation reduction for hot paths Shared success instances π Reuse zero-alloc sentinel successes Lazy exception creation π Defer cost until inspected
Feature Status Purpose Analyzer: ignored Result β Warn on discarded results Analyzer: chain simplification β Suggest Bind/Ensure improvements Domain error source generator π Scaffold boilerplate error records Debugger Display π Rich summary in debugger views Cookbook & Migration Guides π Adoption & onboarding
Design Tenets Composability first, side-effects explicit Rich, structured errors (codes + metadata) without forcing heavy frameworks Parity between sync and async to avoid ergonomic drift Source generation for advanced introspection & multi-arity to keep runtime lean Opt-in performance modes (struct variant) after API surface stabilizes Open Questions (Tracking) Should implicit conversions be always-on or opt-in via a using directive? (Ergonomics vs surprise conversions) Error propagation policy for metadata collisions (currently: last write wins). Need documented policy & maybe strategy enum. Formatting contract for ToString / DebuggerDisplay (deterministic key ordering? truncation rules?) Scope of multi-error aggregation vs single primary error (how deep do we go before complexity hurts usability?) Contributing Issues / PRs welcome. When proposing a new operator, outline:
Category (Transformation / Inspection / Composition / Interop) Sync/Async symmetry plan Overload shape and naming rationale Interaction with existing operators (e.g., precedence with Ensure / MapError) Full Detail For exhaustive status (including exploratory backlog) see the repository root: ResultFeatures.md
.
Last updated: 2025-10-02