null [re: spec#]

Nick Sabalausky a at a.a
Sun Nov 7 21:51:23 PST 2010


"Simen kjaeraas" <simen.kjaras at gmail.com> wrote in message 
news:op.vltjpebhvxi10f at biotronic-pc.lan...
> Nick Sabalausky <a at a.a> wrote:
>
>> - if ( m > 12 ) {
>> + if ( p && m > 12 ) {
>>
>> And you can toss in an "if(m>12) assert(p);" if you're worried about 
>> that.
>
> Of course. But the point is, this is unnecessary. We know p !is null
> when m > 4.
>

And my point is, the need to write it the way you described is unnecessary 
and frankly, error prone. So if better safety can be obtained by ditching a 
useless style that really shouldn't be used anyway, I say we should go for 
it.




More information about the Digitalmars-d mailing list