if(arr) now a warning

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Mon May 4 03:30:39 PDT 2015


On Mon, 04 May 2015 10:27:47 +0000, Ola Fosheim Grøstad wrote:

> On Friday, 10 April 2015 at 10:14:43 UTC, Martin Nowak wrote:
>> if (arr) -> if (!arr.empty)
>>
>> It's much clearer and also what you need to write when you work with
>> ranges.
> 
> Maybe rename it "opEmpty" then.
> 
> Try to keep language protocols and library conventions separate.

or at least move it to "object.d", so i don't have to import "std.range" 
to get this check working.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150504/bb8abe7a/attachment.sig>


More information about the Digitalmars-d mailing list