What about putting array.empty in object.d?

Steven Schveighoffer schveiguy at yahoo.com
Wed Mar 21 13:46:50 PDT 2012


On Wed, 21 Mar 2012 16:43:28 -0400, Steven Schveighoffer  
<schveiguy at yahoo.com> wrote:

> On Wed, 21 Mar 2012 16:21:21 -0400, Nick Sabalausky <a at a.a> wrote:
>
>> "Steven Schveighoffer" <schveiguy at yahoo.com> wrote in message
>> news:op.wbjc7au8eav7ka at localhost.localdomain...
>>>
>>> As an bonus this gets rid of the controversial behavior of if(array)
>>> translating to if(array.ptr).
>>>
>>
>> Yea, I'm not *necessarily* opposed to "if(array)" translating to
>> "if(array.length != 0)" (athough it would break code that relies on the
>> "null vs empty" distinction)
>
> We have discussed ways of introducing this in the least painful way.  I  
> think it should happen, no matter what the pain, since it's the least  
> obvious choice.

What I mean is the *current behavior* is the least obvious choice :D

-Steve


More information about the Digitalmars-d mailing list