memoize (is this a fix for overloading?)
%u
wfunction at hotmail.com
Tue Jan 4 14:49:11 PST 2011
> 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!)
More information about the Digitalmars-d
mailing list