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.
...
6. enforce() is meant to check for input errors (environmental errors are considered input).

7. using enforce() to check for program bugs is utterly wrong. enforce() is a library creation, the core language does not recognize it.

Could you expand on what you consider input?  For example, if a
function has an "in" contract that validates input parameters, is
the determination that a parameter is invalid a program bug or
simply invalid input?  If you consider this invalid input that
should be checked by enforce(), can you explain why?

Reply via email to