if(arr) now a warning

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 10 05:22:15 PDT 2015


"Kagamin"  wrote in message news:pdxfmrxrtfcwextsankd at forum.dlang.org...

> It's probably a nitpick, I like arr!=null expression a lot, but currently 
> compiler generates a horrible code for it: ldc generates comparison with 
> typeinfos, and dmd inlines whole memcmp among other things instead of 
> converting it to just arr.length!=0.

Things like this are worth reporting. 
https://issues.dlang.org/show_bug.cgi?id=14436 



More information about the Digitalmars-d mailing list