checkedint call removal

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 28 23:35:06 PDT 2014


"Ola Fosheim Gr"  wrote in message 
news:kpfxpgdpakuqrdziawxl at forum.dlang.org...

> I find it worrying that you take so lightly on basic correctness. Asserts 
> are entirely probabilistic in nature. What you are arguing for is a regime 
> where a single bad assert can result in the user's disk getting wiped even 
> though you had protections in place in the code without asserts that would 
> have prevented it. That is horrible.

The idea is you test your code with assertions enabled, and then only use 
'-release' when you are sure your program functions correctly.

If you are doing critical work or do not trust program input, either do not 
disable assertions or use a tool like enforce that does not get disabled in 
release mode. 



More information about the Digitalmars-d mailing list