Associative Arrays in the data segment

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 10 20:26:09 PDT 2015


"Martin Nowak"  wrote in message 
news:apzvykkdevzgmqbsldke at forum.dlang.org...

> It might make sense as an intermediate step. After all it's fairly simple 
> and who knows how long we'll take to change the AA implementation.
> But what I find unacceptable is a lousy intermediate solution that 
> supports int, but not short and only if the value isn't a const string or 
> a class starting with the letter K.
> I don't want to add another facet to the already long AA story.
> So if you can fix the problem and are willing to do the work, go on. Just 
> adding a tiny hack makes the situation worse IMO.

Oh, I agree.  The current PR is just an example, although it supports a lot 
more than just int as keys.

Current support is int,uint,short,ushort,byte,ubyte,char,wchar,dchar as 
keys, anything that can be used to initialize a global as a value.  At the 
very least it will support all integral basic types and arrays of integral 
types.  (which includes strings) 



More information about the Digitalmars-d mailing list