assume, assert, enforce, @safe

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 31 19:33:59 PDT 2014


"Artur Skawina via Digitalmars-d"  wrote in message 
news:mailman.324.1406835164.16021.digitalmars-d at puremagic.com...

> > The corner case is "assert(0)".  It means "if the program got to here, 
> > the impossible
> has happened."
>
> It's vaguely defined, overloaded, and not currently treated that way.
> Arguably it could mean 'this path won't ever be reached, trust me', but
> redefining it now is obviously not possible. (doing this would of course
> make assert(0) extremely dangerous)

You should probably read the spec on assert.  The assert(0) case is already 
defined that way. 



More information about the Digitalmars-d mailing list