AA reimplementation (Was: Re: AA: How to lose a class)

Brad Anderson eco at gnuk.net
Fri May 24 18:58:11 PDT 2013


On Thursday, 23 May 2013 at 13:40:44 UTC, H. S. Teoh wrote:
> On Thu, May 23, 2013 at 11:35:36AM +0200, Dicebot wrote:
>> On Thursday, 23 May 2013 at 09:30:51 UTC, David wrote:
>> >...
>> 
>> Problem has been mentioned here :
>> http://wiki.dlang.org/AA_Implementation_Issues
>
> I looked over this page again today, and I'm wondering if 
> perhaps
> instead of balking at the sheer immensity of the task of 
> overhauling
> AA's, we could begin to chip away at some things that will 
> eventually
> ease the task.
>
> The biggest problem currently is the compiler magic sprinkled 
> throughout
> the DMD code that generates AA-related code. Perhaps, instead 
> of waiting
> until the new AA code is ready, we can begin by going over all
> AA-related code in DMD, and cleaning them up so that they 
> interface with
> aaA.d only via the AssociativeArray(K,V) template. The idea is 
> to make
> the DMD code cleaner while still using the current AA 
> implementation,
> but to move away from hardcoded dependencies on aaA.d so that 
> eventually
> we can just make the new AA implementation a drop-in 
> replacement. Doing
> this now instead of waiting for the new implementation to be 
> ready
> allows us to ensure no bugs are introduced by the decoupling of 
> DMD from
> aaA.d.
>
> Since we're reviewing all DMD code right now anyway, to make it
> compatible with the C++ to D convertor, this might be a good 
> time to
> look at all the places that depend on aaA.d and clean them up.
>
>
> T

Incremental sounds like the right approach.  The problems you 
experienced in your earlier attempt sounded too daunting to do it 
in one fell swoop.


More information about the Digitalmars-d mailing list