Program logic bugs vs input/environmental errors

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 19 14:03:23 PST 2014


On 11/19/2014 3:59 AM, Bruno Medeiros wrote:
> Just to add another one, one that I recently came across while coding, was an
> assertion check that I put, which, if it where to fail, would only cause a
> redundant use of memory (but no NPEs or access violations or invalid state, etc.).


If you're comfortable with that, then you should be using enforce(), not assert().


More information about the Digitalmars-d mailing list