Zcoin implementation bug enabled attacker to create 548, 000 Zcoins

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Thu Mar 9 08:47:59 PST 2017

John Colvin wrote:

> On Thursday, 9 March 2017 at 15:55:07 UTC, deadalnix wrote:
>> On Thursday, 9 March 2017 at 15:42:22 UTC, qznc wrote:
>>> I'm curious. Where does it make sense for opEquals to be non-pure? 
>>> Likewise opCmp, etc.
>> When the object need some kind of normalization to be comparable and you 
>> don't want to do the normalization every single time.
> I wonder how stupid it would be to cast the implementation to pure in 
> this case.

as any other lie. broken promise == UB. while current compiler *may* 
tolerate it, broken promise is a broken promise.

More information about the Digitalmars-d mailing list