[Issue 4733] Possible bugs caused by dynamic arrays in boolean evaluation context

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 27 03:20:01 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=4733



--- Comment #17 from rswhite4 at googlemail.com 2013-11-27 03:19:55 PST ---
(In reply to comment #16)
> (In reply to comment #14)
> 
> > I would prefer that the warning consider arr.length != 0 more than
> > std.array.empty. Nothing else. Hope you understand me now.
> 
> Suggesting people to use length is not a good idea. For that semantics there is
> empty that is safer and more clean, and it's the preferred idiom in D code.
Not in any D code I've written or I've seen so far. But thanks for explanation.
I use already arr.length != 0 anyway. :)
> (I have an enhancement request to extend the "empty" to work on associative
> arrays too, Issue 6409 ).

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list