(non)nullable types

Nick Sabalausky a at a.a
Sat Feb 14 11:42:38 PST 2009


"Christopher Wright" <dhasenan at gmail.com> wrote in message 
news:gn6h0r$1mk9$1 at digitalmars.com...
> Nick Sabalausky wrote:
>> I still like this that someone else mentioned:
>>
>> T? x = something;
>> if(x !is null)
>> {
>>     // x is implicitly "T" here, not "T?"
>> }
>> else
>> {
>>     // handle null condition (x is still "T?")
>> }
>>
>>
>
> I hate it.
>
> It encourages too much nesting, and it silently changes a variable's type.

You're right, I've come to realize that in a different branch of this 
thread. 





More information about the Digitalmars-d mailing list