Why is D unpopular?
forkit
forkit at gmail.com
Tue May 24 09:12:02 UTC 2022
On Tuesday, 24 May 2022 at 06:55:52 UTC, Siarhei Siamashka wrote:
>
> ....
> You just need to remember to use 'enforce' instead of 'assert'.
> ....
It's not correct to suggest that these are simply interchangeable.
They may appear to be similar, but they are two very different
things.
For example (to just make that point):
nothrow void checkSomething(bool checkThis)
{
//enforce(checkThis == true); // nope! enforce throws an
exception.
assert(checkThis == true); // ok.
}
More information about the Digitalmars-d
mailing list