against enforce

Kagamin spam at here.lot
Sat Mar 26 04:36:20 PDT 2011


Jonathan M Davis Wrote:

> So, there is a clear and distinct difference between the intended uses of 
> assert and exceptions (and therefore enforce). They have very different roles. 
> The question then is not what their roles are but what you need a particular 
> function to do - e.g. treat it's input as user input or treat it as local to 
> the program (and therefore a bug if it's wrong).

I don't think it's a terminological question, it's a practical question, every piece of code should do something useful. Ok, assert checks for bugs. The question is should these checks be removed and why.


More information about the Digitalmars-d mailing list