Proof of concept - library AA
IgorStepanov via Digitalmars-d
digitalmars-d at puremagic.com
Mon May 25 16:44:04 PDT 2015
On Sunday, 24 May 2015 at 15:13:41 UTC, Vladimir Panteleev wrote:
> On Sunday, 24 May 2015 at 14:13:26 UTC, Martin Nowak wrote:
>> Would be interesting to get some opinions on this.
>>
>> https://github.com/D-Programming-Language/druntime/pull/1282
>
> Looks like a good step in the right direction.
>
> Some questions about:
>
>> This provides a strong incentive to no longer use the magic
>> semantics of the builtin AAs,
>
> Could you elaborate on what these magic semantics are?
>
>> and no easy solution exists for the ++aa[key1][key2] case.
>
> Is this specific to the pre-increment? aa[key1][key2]++ is
> generally a useful pattern.
The general idea that library aa has a vtbl, and standart AA
fuctions like _aaGetX will access to our AA via vtbl.
Compiler will operate with aa via all those _aaGetX, _aaLen et c.
Thus aa[x][y]++; will work as early.
More information about the Digitalmars-d
mailing list