Associative Arrays in the data segment

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 10 09:00:46 PDT 2015


On 4/10/15 7:20 AM, Daniel Murphy wrote:
> "Steven Schveighoffer"  wrote in message
> news:mg8ln4$1dtb$1 at digitalmars.com...
>
>> It's all the rage these days, Walter just started a thread on it ;)
>
> Thread != activity.
>
>> But the issue I see is that this is a step BACKWARDS. We want to move
>> to more possibility of customization, not less. Subtle differences in
>> compiler/library implementation are the stuff nightmare bugs are made of.
>
> It lets us do something we currently can't do but want to, at the cost
> of making something we could do but haven't for years slightly harder.
>
> If somebody really wants to improve the runtime AA implementation, they can
> a) Update the compiler code to do the same thing
> b) Ask me and I'll do it
>
> Not being able to put AAs in the data segment is a stupid limitation
> that we should have fixed years ago.
>
>> I think it's possible now, but nobody has been able to exactly
>> duplicate certain aspects of the builtin AA. I may take a stab at it.
>> We also had a horrible experience of "half-library half magic" type a
>> few years ago.
>
> The only positive thing that's made it into master in the last few years
> is rolling back the AA implementation.
>
>> But the real answer is, as soon as someone does it who has
>> Walter's/Kenji's/your ear, we can create an AA, and fix the compiler
>> to use and support it. It needs an advocate (who is willing to do the
>> hard work).
>
> I'm not holding my breath.

Sadly I'm among the folks who aren't jazzed by this. It seems like an 
evolutionary backward step of only short-lived value. It's telling that 
some of the supporting arguments count on bad things not improving.

Andrei



More information about the Digitalmars-d mailing list