Regarding Nullables
Timon Gehr via Digitalmars-d
digitalmars-d at puremagic.com
Sun Sep 14 20:01:12 PDT 2014
On 09/14/2014 07:42 PM, Andrei Alexandrescu wrote:
> On 9/14/14, 6:17 AM, "Marc Schütz" <schuetzm at gmx.net>" wrote:
>> What if the operation failed without producing an exception? I.e., if we
>> wrap an API that signals errors by returning false for example, do we
>> really need to create an exception just to store it in `r.exception`?
>
> UnspecifiedException
'Maybe' has traditionally denoted a type constructor which adds exactly
one additional possible state to the underlying type, so this type that
stores either a value or an exception should IMO be a separate construct.
More information about the Digitalmars-d
mailing list