assume, assert, enforce, @safe

Tofu Ninja via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 30 19:05:29 PDT 2014


On Wednesday, 30 July 2014 at 22:01:23 UTC, Walter Bright wrote:

> 3. Use of assert to validate input is utterly wrong and will 
> not be supported. Use such constructs at your own risk.

When exactly is it 'ok' to use assert then?

If asserts are not allowed to be used to verify inputs.... then
by extension, they can not be used to verify any derivative of an
input. So by that definition, asserts are only ok to use on any
thing known at compile time... that makes them utterly useless....


More information about the Digitalmars-d mailing list