I just spent a couple hours making a library AA solution that is binary compatible with druntime's builtin AA.

The benefits:

1. Proves that a library implementation is possible, also shows where shortcomings are.
2. Usable at compile time to make an AA that can be used at runtime.
3. Much more approachable code than the AA runtime, does not require "faking" a typeinfo, dealing with typeinfo in general, or deal with magic compiler hooks. This gives a good base to start experimenting with.

For the future:

1. Implement all the things that AAs can do (which are possible, some are not).
2. Look at alternatives to GC for allocation/deallocation.
3. Possible use with betterC?

Anyway, enjoy!

https://code.dlang.org/packages/newaa

-Steve

Reply via email to