Compile-time AAs
bearophile
bearophileHUGS at lycos.com
Mon Sep 14 22:08:50 PDT 2009
Don has recently said that adding dynamic arrays at compile-time looks easy. I'd also like to have compile-time associative arrays. So you can fill them inside a CT function (the compiler may try to do the same for AAs created inside a static this(){}), and save some run time.
Even if such compile-time AAs have to be immutable at run-time they can be useful anyway.
A smarter implementation of such CT AAs may even use a perfet hashing, to make them quite fast.
Bye,
bearophile
More information about the Digitalmars-d
mailing list