On Sunday, 2 September 2018 at 23:38:41 UTC, Per Nordlöw wrote:
On Sunday, 2 September 2018 at 06:59:20 UTC, Paul Backus wrote:
expectations is an error-handling library that lets you bundle exceptions together with return values. It is based on Rust's Result<T, E> [1] and C++'s proposed std::expected. [2] If you're not familiar with those, Andrei's NDC Oslo talk, "Expect the Expected" [3], explains the advantages of this approach to error handling in considerable detail.

Incidentally, I've already proposed `Expected` into Phobos std.experimental.typecons here

https://github.com/dlang/phobos/pull/6686

Is it ok if I try to merge your effort into this pull request?

I don't think expectations has reached a high enough level of quality yet to be ready for inclusion in Phobos. However, if you'd like to submit it for comments as a WIP, or use it as a reference for your own implementation, that's completely fine, and I'd be happy to help you.
  • expectations 0.1.0 Paul Backus via Digitalmars-d-announce
    • Re: expectation... Per Nordlöw via Digitalmars-d-announce
      • Re: expecta... Paul Backus via Digitalmars-d-announce
    • Re: expectation... Vladimir Panteleev via Digitalmars-d-announce
      • Re: expecta... Paul Backus via Digitalmars-d-announce
        • Re: exp... Nick Sabalausky (Abscissa) via Digitalmars-d-announce
          • Re:... Paul Backus via Digitalmars-d-announce
            • ... aliak via Digitalmars-d-announce
            • ... Nick Sabalausky (Abscissa) via Digitalmars-d-announce
              • ... Paul Backus via Digitalmars-d-announce
                • ... Nick Sabalausky (Abscissa) via Digitalmars-d-announce
                • ... Paul Backus via Digitalmars-d-announce
      • Re: expecta... Thomas Mader via Digitalmars-d-announce

Reply via email to