On Sunday, October 11, 2015 05:10:34 tcak via Digitalmars-d-learn wrote:
> On Saturday, 10 October 2015 at 20:07:11 UTC, Jonathan M Davis
> wrote:
> > On Saturday, October 10, 2015 15:20:02 tcak via
> > Digitalmars-d-learn wrote:
> >> [code]
> >> int[] list;
> >>
> >> list = new int[0];
> >>
>
On Saturday, 10 October 2015 at 15:46:51 UTC, Meta wrote:
On Saturday, 10 October 2015 at 15:20:04 UTC, tcak wrote:
[code]
int[] list;
list = new int[0];
std.stdio.writeln("Is Null ? ", (list is null));
[/code]
Result is "Is Null? true".
}
Do I miss the point
On Saturday, 10 October 2015 at 20:07:11 UTC, Jonathan M Davis
wrote:
On Saturday, October 10, 2015 15:20:02 tcak via
Digitalmars-d-learn wrote:
[code]
int[] list;
list = new int[0];
std.stdio.writeln("Is Null ? ", (list is null));
[/code]
Result is "Is Null? true".
Is this the correct
On Sunday, 11 October 2015 at 00:18:54 UTC, Meta wrote:
On Saturday, 10 October 2015 at 20:07:11 UTC, Jonathan M Davis
wrote:
It basically didn't bother to allocate an array on the heap,
because you asked for one with a length of zero.
Efficiency-wise, it makes no sense to allocate anything. Yo
On Saturday, 10 October 2015 at 20:07:11 UTC, Jonathan M Davis
wrote:
It basically didn't bother to allocate an array on the heap,
because you asked for one with a length of zero.
Efficiency-wise, it makes no sense to allocate anything. You
wouldn't be doing anything with the memory anyway. The
On Saturday, October 10, 2015 15:20:02 tcak via Digitalmars-d-learn wrote:
> [code]
> int[] list;
>
> list = new int[0];
>
> std.stdio.writeln("Is Null ? ", (list is null));
> [/code]
>
> Result is "Is Null? true".
>
> Is this the correct behaviour? I would expect compiler to point
> to an ad
On Saturday, 10 October 2015 at 15:20:04 UTC, tcak wrote:
[code]
int[] list;
list = new int[0];
std.stdio.writeln("Is Null ? ", (list is null));
[/code]
Result is "Is Null? true".
Is this the correct behaviour? I would expect compiler to point
to an address in the hea
On Saturday, 10 October 2015 at 15:20:04 UTC, tcak wrote:
[code]
int[] list;
list = new int[0];
std.stdio.writeln("Is Null ? ", (list is null));
[/code]
Result is "Is Null? true".
Is this the correct behaviour? I would expect compiler to point
to an address in the hea
[code]
int[] list;
list = new int[0];
std.stdio.writeln("Is Null ? ", (list is null));
[/code]
Result is "Is Null? true".
Is this the correct behaviour? I would expect compiler to point
to an address in the heap, but set the length as 0. So, it
wouldn't return null, b