empty arrays and cast(bool): WAT

Timon Gehr timon.gehr at gmx.ch
Sat Feb 18 19:13:02 PST 2012


On 02/19/2012 03:24 AM, bearophile wrote:
> Timon Gehr:
>
>> Is there any reason for empty arrays to evaluate to true? This is very
>> bug prone.
>
> Related?
> http://d.puremagic.com/issues/show_bug.cgi?id=4733
>
> Bye,
> bearophile

Roughly. I want it to be allowed, but to test the length instead of ptr.


More information about the Digitalmars-d mailing list