On Sun, 30 Jun 2013 21:43:53 -0400, Jonathan M Davis <jmdavisp...@gmx.com> wrote:

On Sunday, June 30, 2013 19:20:47 Steven Schveighoffer wrote:

No, the main issue is the current one is runtime-only, and so simple
function calls such as toHash and opCmp cannot be inlined.

Yeah. That's a big problem. We really need to templatize all that - though the
current implementation is enough of a mess to make that difficult.

The current implementation suffers from two problems:

1. The compiler doesn't treat T[U] as a direct instantiation of AssocArray!(T, U) in all cases. 2. The compiler has bugs in terms of pure/@safe/ctfe/etc that it "overlooks" when using built-in AAs. I think those who have tried to make a complete library-replacement for AAs have found this out.

The best path to resolution I think is:

1. make a complete replacement for AAs that can be instantiated and operate without mapping to the AA syntax. It may not build, but it should be written and bugs against the compiler filed.
2. Fix all bugs to make 1. compile/possible
3. Switch compiler to use type in 1. whenever AA's are used.

I believe some have made a very good attempt to do 1 (H.S. Teoh I think? maybe someone else)

-Steve

Reply via email to