So are a newly allocated array and a null one just the same thing?<div><br></div><div><div>    int[] a = [], b = null;</div><div>    assert(a == b);</div><div>    assert(a.length == b.length);</div><div>    assert(a.ptr == a.ptr);</div>

<div><br></div><div>My code made distinction between empty and invalid collections, this mean that need to track the invalidation on another place?</div><div><br></div>Pedro Lacerda<br><br>
<br><br><div class="gmail_quote">2012/2/27 bearophile <span dir="ltr"><<a href="mailto:bearophileHUGS@lycos.com">bearophileHUGS@lycos.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Jonathan M Davis:<br>
<div class="im"><br>
> Arrays treat null kind of funny.<br>
<br>
</div>Seen with the knowledge of today, the D confusion between pointers and dynamic arrays was a design mistake.<br>
Recently a bit of this mess was fixed, now this is a syntax error, thanks to Don support too:<br>
<br>
void main() {<br>
    auto a = new int[5];<br>
    *a = 2;<br>
}<br>
<br>
But I'd like this whole situation to be fixed a bit more.<br>
<br>
Bye,<br>
bearophile<br>
</blockquote></div><br></div>