My Kingdom For ...

Bill Baxter dnewsgroup at billbaxter.com
Thu Feb 21 12:11:35 PST 2008


Janice Caron wrote:
> On 21/02/2008, Bill Baxter <dnewsgroup at billbaxter.com> wrote:
>> I'd vote enthusiastically for issuing a warning, but I don't like the
>>  idea of changing behavior just for that one special case.
> 
> I'd be inclined to agree, but for the fact that D doesn't have warnings.
> 
> So, you could say, second best option, make it a compile error.
> 
>     if (c == null) // ERROR
> 
> Anyone see any problem with that? Sure, it'd be annoying, but I think
> it would a lot /less/ annoying than a crash at run time.

What's that -w flag do?  Wouldn't it be appropriate there?

--bb



More information about the Digitalmars-d mailing list