Re:ManagedCode.Communication – a complete Result Pattern pro...
by jerleth on Wednesday August 13, 2025 @05:52AM
(#44886479)
I just glanced at the page, so I might be off, but to me it looks like this is only a solution for the special case of exceptions?
Why would I want to use this instead of a more general approach to discriminated unions, eg. like: https://github.com/mcintyre321/OneOf
If I would use your library I would need a separate solution for every other case.
Take care, Martin
Instead of throwing exceptions, your methods return Result or Result<T> — explicit, type-safe outcomes that are easy to compose with Map, Bind, Match, Tap, and other railway-oriented methods. For web APIs, failures can be automatically converted into RFC 7807 Problem Details responses, providing clients with structured error information (type, title, detail, status, plus custom extensions). For collections, CollectionResult<T> combines data with paging metadata in a single, consistent return type.
The idea is to have everything you might need for Result Pattern development in one place: functional composition methods, rich error modeling, ready-to-use framework integrations — without having to stitch together multiple third-party libraries or hand-roll adapters for production.
On the roadmap: first-class support for commands (command handlers working directly with Result types), idempotency strategies for safe retries in distributed systems, and extended logging to trace a result’s journey through complex workflows (API → SignalR → Orleans → client).
We’re looking for honest feedback from developers who use Result Patterns in real projects. What’s missing? What would make this your go-to solution instead of writing your own?