Object.opEquals, opCmp, toHash

Walter Bright newshound2 at digitalmars.com
Thu Feb 16 02:16:22 PST 2012


On 2/16/2012 1:47 AM, Don Clugston wrote:
> I'm less sure about pure, though. What if (for example) you have a struct which
> is just an index into a global table? Like a Windows handle, for example. That
> should still work.

Without pure, associative arrays cannot work reliably.

I'd suggest that if one is relying on a mutable global array, that one shouldn't 
use opEquals, opCmp, etc., and should use functions with other names.


More information about the Digitalmars-d mailing list