Forbid dynamic arrays in boolean evaluation contexts

Vladimir Panteleev vladimir at thecybershadow.net
Tue Mar 26 16:28:44 PDT 2013


On Tuesday, 26 March 2013 at 22:04:32 UTC, Steven Schveighoffer 
wrote:
> On Tue, 26 Mar 2013 17:31:26 -0400, Vladimir Panteleev 
> <vladimir at thecybershadow.net> wrote:
>
>> On Tuesday, 26 March 2013 at 17:57:47 UTC, Steven 
>> Schveighoffer wrote:
>>> But it definitely is NOT a bug.  Any suggested change would 
>>> be an enhancement request.
>>
>> Why do you think it is not a bug? It is inconsistent with "", 
>> and what's the point of [] if you can just use "null"?
>
> Meaning it functions as designed.  Whether you agree with the 
> design or not, it's still not a bug.

What I meant is: why do you think this was an intentional, 
thought-out design decision? Where is the justification for it? 
I'd say it's more likely it was written with no thought given to 
the distinction between null and empty arrays.

> And once again, "" is different because of C compatibility.  If 
> that were not a requirement, "" would map to null.

Why do you think so? Sorry, but to me it just seems like you're 
stating personal conjecture as absolute facts.

This discussion is ultimately inconsequential, because we 
probably can't change it now as it would break code, but your 
certainty regarding the origins of these decisions lead me to 
believe that you know something I don't.


More information about the Digitalmars-d mailing list