On Sunday, 24 May 2020 at 12:29:23 UTC, bauss wrote:
Dang, that sucks there is no proper way and I would say that's
a big flaw of D.
Because what I need it for is for some data serialization but
if the value is an empty array then it should be present and if
it's null then it should not be pr
On 5/24/20 8:12 AM, bauss wrote:
Is there a way to do that?
Since the following are both true:
int[] a = null;
int[] b = [];
assert(a is null);
assert(!a.length);
assert(b is null);
assert(!b.length);
What I would like is to tell that b is an empty array and a is a null
array.
The issue i
On Sunday, 24 May 2020 at 12:37:20 UTC, ag0aep6g wrote:
On 24.05.20 14:29, bauss wrote:
Dang, that sucks there is no proper way and I would say that's
a big flaw of D.
Because what I need it for is for some data serialization but
if the value is an empty array then it should be present and
i
On Sunday, 24 May 2020 at 12:12:31 UTC, bauss wrote:
Is there a way to do that?
Since the following are both true:
int[] a = null;
int[] b = [];
assert(a is null);
assert(!a.length);
assert(b is null);
assert(!b.length);
What I would like is to tell that b is an empty array and a is
a null
On 24.05.20 14:29, bauss wrote:
Dang, that sucks there is no proper way and I would say that's a big
flaw of D.
Because what I need it for is for some data serialization but if the
value is an empty array then it should be present and if it's null then
it should not be present.
Since null i
On 24.05.20 14:12, bauss wrote:
Is there a way to do that?
Since the following are both true:
int[] a = null;
int[] b = [];
assert(a is null);
assert(!a.length);
assert(b is null);
assert(!b.length);
What I would like is to tell that b is an empty array and a is a null
array.
No way. `nul
On Sunday, May 24, 2020 6:12:31 AM MDT bauss via Digitalmars-d-learn wrote:
> Is there a way to do that?
>
> Since the following are both true:
>
> int[] a = null;
> int[] b = [];
>
> assert(a is null);
> assert(!a.length);
>
> assert(b is null);
> assert(!b.length);
>
> What I would like is to tel
On Sunday, 24 May 2020 at 12:26:42 UTC, ag0aep6g wrote:
On 24.05.20 14:12, bauss wrote:
Is there a way to do that?
Since the following are both true:
int[] a = null;
int[] b = [];
assert(a is null);
assert(!a.length);
assert(b is null);
assert(!b.length);
What I would like is to tell that b
On Sunday, 24 May 2020 at 12:12:31 UTC, bauss wrote:
Is there a way to do that?
Since the following are both true:
int[] a = null;
int[] b = [];
assert(a is null);
assert(!a.length);
assert(b is null);
assert(!b.length);
What I would like is to tell that b is an empty array and a is
a null
Is there a way to do that?
Since the following are both true:
int[] a = null;
int[] b = [];
assert(a is null);
assert(!a.length);
assert(b is null);
assert(!b.length);
What I would like is to tell that b is an empty array and a is a
null array.
10 matches
Mail list logo