checkedint call removal
Daniel Murphy via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jul 28 06:50:28 PDT 2014
"Ola Fosheim Grøstad" " wrote in message
news:scibhjsiolgykujqxwbx at forum.dlang.org...
> In that case I will write my own assert() that doesn't have this
> behaviour. Nobody who cares about program verification and correctness
> will touch this.
Yes.
> assert() is no guarantee for correctness, it is basically a break-point
> check. A sloppy request from the programmer to check some constraint that
> possibly could be overspecified, and that could silently pass. The the
> optimizer might assume that "length<1024" etc and create all kinds of
> problems.
Yes, writing code wrong can result in the wrong thing happening. A
non-release build will always retain the asserts.
> Assert() are useful debugging tools, but not a codegen feature. A good
> debugger could allow you to turn them on/off or let you continue after
> hitting one. That's useful.
If this is what you want you shouldn't be using assert. This is not what
assert means in D.
More information about the Digitalmars-d
mailing list