On Saturday, 8 July 2017 at 00:55:46 UTC, FoxyBrown wrote:
[...]
It should be mandatory that all asserts, throws, etc provide
correct information about not only the point of the error but
also the location and what caused it. [...]
Error messages are sensible when they provide context (e.g. for
complex conditions).
In my experience, though, most asserts exist to cover fairly
obvious cases, where an additional message would just add noise:
---
struct SomeRange
{
bool empty() { ... }
void popFront()
{
assert (!empty);
...
}
}
---