Something H.S. Teoh in a recent pull request in Github got me
thinking that it would be useful in some cases to tell the
compiler that you want to automatically infer the either the key
type or value type of an AA. Something like the following:
//typeof(aa) -> string[int]
string[auto] aa = [1:
On Thursday, 7 August 2014 at 16:07:38 UTC, Meta wrote:
Something H.S. Teoh in a recent pull request
Something H.S. Teoh *said* in a recent pull request
"Meta" wrote in message news:ohzzgcslkthrozimf...@forum.dlang.org...
Something H.S. Teoh in a recent pull request in Github got me thinking
that it would be useful in some cases to tell the compiler that you want
to automatically infer the either the key type or value type of an AA.
Something
On Thursday, 7 August 2014 at 17:37:54 UTC, Daniel Murphy wrote:
"Meta" wrote in message
news:ohzzgcslkthrozimf...@forum.dlang.org...
Something H.S. Teoh in a recent pull request in Github got me
thinking that it would be useful in some cases to tell the
compiler that you want to automatical
"Meta" wrote in message news:uvtdfndzaiamyvtkb...@forum.dlang.org...
Isn't that also the case for the auto*, const[], immutable[$],
etc. syntax? Conceptually it feels the same to me as Kenji's
enhancement; I don't know enough about the compiler to talk about
it technically.
Yes, I have the
Meta:
Isn't that also the case for the auto*, const[], immutable[$],
etc. syntax? Conceptually it feels the same to me as Kenji's
enhancement; I don't know enough about the compiler to talk
about it technically.
One difference between Kenji's enhancement and the AA type
inference is that ar
On Thursday, 14 August 2014 at 18:07:57 UTC, bearophile wrote:
Meta:
Isn't that also the case for the auto*, const[], immutable[$],
etc. syntax? Conceptually it feels the same to me as Kenji's
enhancement; I don't know enough about the compiler to talk
about it technically.
One difference b
I implemented partial type deduction in AA keys.
https://github.com/D-Programming-Language/dmd/pull/3615
For example:
auto[auto[$]] aa5 = [[1,2]:1, [3,4]:2];
static assert(is(typeof(aa5) == int[int[2]]));
int[int[][$]] aa15 = [[[1],[2]]:1, [[3],[4]]:2];
static assert(is(typeof(aa1
Kenji Hara:
I implemented partial type deduction in AA keys.
https://github.com/D-Programming-Language/dmd/pull/3615
For example:
auto[auto[$]] aa5 = [[1,2]:1, [3,4]:2];
static assert(is(typeof(aa5) == int[int[2]]));
int[int[][$]] aa15 = [[[1],[2]]:1, [[3],[4]]:2];
static asser
Kenji Hara:
> I implemented partial type deduction in AA keys.
> https://github.com/D-Programming-Language/dmd/pull/3615
>
> For example:
> auto[auto[$]] aa5 = [[1,2]:1, [3,4]:2];
> static assert(is(typeof(aa5) == int[int[2]]));
>
> int[int[][$]] aa15 = [[[1],[2]]:1, [[3],[4]]:2];
>
On Friday, 15 August 2014 at 08:34:22 UTC, Kenji Hara via
Digitalmars-d wrote:
I implemented partial type deduction in AA keys.
https://github.com/D-Programming-Language/dmd/pull/3615
For example:
auto[auto[$]] aa5 = [[1,2]:1, [3,4]:2];
static assert(is(typeof(aa5) == int[int[2]]));
11 matches
Mail list logo