Option and Result [was Integration tests]
sascha.orlov at gmail.com
Tue Apr 21 19:05:25 UTC 2020
On Tuesday, 21 April 2020 at 16:30:15 UTC, Russel Winder wrote:
> On Mon, 2020-04-20 at 20:19 +0000, aliak via
> Digitalmars-d-learn wrote:
>> : https://github.com/aliak00/optional
> Rust has Option and Result, and most languages are rapidly
> introducing at least Option if not Result – and yes it is
> almost certain all this comes from Haskell.
> Is Option intended for adding to Phobos?
There is Nullable in Phobos. This is not really an Option, I
know. But just in case.
But back to integration tests, there are indeed only few
possibilities to mock something. However, the basics are there.
I found a section of code generation a while ago in std.typecons.
There are Black and White holes there, for example, which could
help to implement a basic mocking framework.
More information about the Digitalmars-d-learn