Can getHash be made pure?

Walter Bright newshound2 at digitalmars.com
Fri Mar 9 14:01:01 PST 2012


On 3/9/2012 1:54 PM, H. S. Teoh wrote:
> Still chugging away at implementing AA's in druntime proper, I reviewed
> the code for methods that can be marked pure but ran into a major road
> block: getHash() is not marked pure. That makes a lot of AA methods
> impure, that could, and probably should, be marked pure.
>
> Is it possible to make TypeInfo.getHash() pure? AFAICT there's no good
> reason why it shouldn't be pure. Am I missing something?

It should be const, pure, nothrow, @safe.


More information about the Digitalmars-d mailing list