if(arr) now a warning
Steven Schveighoffer via Digitalmars-d
digitalmars-d at puremagic.com
Fri Apr 10 10:28:50 PDT 2015
On 4/10/15 11:57 AM, Andrei Alexandrescu wrote:
> On 4/10/15 6:26 AM, Meta wrote:
>> On Friday, 10 April 2015 at 12:42:47 UTC, Steven Schveighoffer wrote:
>>> Plus, adding arr.empty into object is kind of redundant. The only
>>> reason we have arr.empty is so that it becomes a range.
>>>
>>> -Steve
>>
>> I find it extremely annoying to have to import std.array (or whatever
>> the correct module is) just to use .empty, .front and .popFront on
>> arrays. IMO they should all be in object.d.
>
> Yah, I was about to post the same. Range semantics are embedded in the
> language enough to warrant this.
>
> Also empty should work for AAs.
How should "abc".front work? Do you want to move unicode decoding of
char and wchar arrays into object.d? Serious question, not rhetorical,
because I'm not for or against it (except for the notion of changing
things for the sake of changing them), I just want to point out what is
required.
-Steve
More information about the Digitalmars-d
mailing list