> There's still the risk of keeping multiple hashes. Consider: > ulong fun(ulong n) { ... } > alias memoize!fun mfun;
> mfun(5); // creates hash ulong[int] > mfun(5u); // creates hash ulong[uint] > mfun('5'); // creates hash ulong[char] Ohhh I see... so you're basically looking for a compile-time version of overload resolution, right? Because things seem to be getting complicated very quickly. (An unrelated side note: I'm new to newsgroups, and I was wondering, what program do people mainly use for communication? I'm using the web interface, but do most people use Thunderbird or something? Thank you!)