On Tuesday, 28 February 2017 at 07:41:36 UTC, Christian Köstlin
wrote:
As I understand the only difference between assert and enforce
is, that
assert is not compiled into releases?
Thanks!
Christian
Pretty much so. The intention is that assert means something
that's supposed to be true (and can be assumed in release) while
enforce means something you want to be true (but can't guarantee).
E.g., you can assert that a list is sorted after running heapsort
on it, but you need to enforce that a file is in the correct
format.