11 ms·
While I'm still a fan of the name `assert()`, one alternative that I like is `invariant()`. It seems to capture the idea a little better. The debug vs release
by strmpnk 7y ago
While I'm still a fan of the name `assert()`, one alternative that I like is `invariant()`. It seems to capture the idea a little better.
The debug vs release build is a bit of a problem still but I think part of the issue is around the idea that debug builds are too slow to use at all or take so long to build anyway so you might as well use release optimizations. This is something to address with faster compilers and better teaching (and perhaps encouraging folks to try learning how to use debuggers effectively).