(non)nullable types
Christopher Wright
dhasenan at gmail.com
Mon Feb 9 04:47:30 PST 2009
Brian wrote:
> On Mon, 09 Feb 2009 04:25:55 +0300, Denis Koroskin wrote:
>
>> So, let's ask the community: Would you like to see nullable types in D?
>>
>> http://www.micropoll.com/akira/mpview/539369-138652 (please, don't abuse
>> by voting multiple time)
>>
>> Explain your reasoning in newsgroups. Thank you.
>
> i vote yes, i would absolutely love non-nullable types. in some cases i
> even use dummy objects to avoid null checks.
This is called the Null Object Pattern. Often, you need a special
instance or subclass to satisfy the NOP. For instance, my company's
staff scheduling program might get a null EmployeeGroup class that would
need a reference to the Customer object, unlike other EmployeeGroups, in
order to claim that it contains all employees.
More information about the Digitalmars-d
mailing list