Forbid dynamic arrays in boolean evaluation contexts

Phil Lavoie maidenphil at hotmail.com
Mon Mar 25 10:13:33 PDT 2013


On Monday, 25 March 2013 at 17:05:31 UTC, bearophile wrote:
> Phil Lavoie:
>
>> You think it should check for length to be more programmer 
>> friendly,
>
> My proposal is to turn "if(dyn_arr)" into a syntax error.
>
> Bye,
> bearophile

Yeah, but I also read you were in favor of changing its behavior. 
I'd say that it would make more sense to remove it than to change 
its behavior.

However, testing for null is kinda useful :)

Phil


More information about the Digitalmars-d mailing list