Program logic bugs vs input/environmental errors

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 30 00:17:56 PDT 2014


On 2014-10-29 22:22, Walter Bright wrote:

> Assumptions are not guarantees.
>
> In any case, if the programmer knows than assert error is restricted to
> a particular domain, and is recoverable, and wants to recover from it,
> use enforce(), not assert().

I really don't like "enforce". It encourage the use of plain Exception 
instead of a subclass.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list