Non-null objects, the Null Object pattern, and T.init
deadalnix
deadalnix at gmail.com
Sat Jan 18 15:23:23 PST 2014
On Saturday, 18 January 2014 at 21:05:02 UTC, Walter Bright wrote:
> On 1/17/2014 7:05 AM, Michel Fortin wrote:
>> Some more thoughts.
>
> The postfix ? has parsing issues with ?: expressions.
>
> Aside from that, non-null is only one case of a universe of
> types that are subsets of other types. I'd prefer a more
> general solution.
I was thinking about defining reference types (classes,
interfaces) as considered non nullable in @safe . It is still
possible to encapsulate null in NonNull!T .
More information about the Digitalmars-d
mailing list