digitalmars.D - Re: against enforce
- Kagamin <spam here.lot> Mar 26 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.
Mar 26 2011