Re:The Compiler Is Your Best Friend, Stop Lying to It
by josephg on Thursday January 01, 2026 @11:19PM
(#46461365)
Ah I see what you're saying.
I think the idea is that those asserts should never be hit in the first place, because the code is correct.
In reality, its a mistake to add too many asserts to your code. Certainly not so many that performance tanks. There's always a point where, after doing what you can to make your code correct, at runtime you gotta trust that you've done a good enough job and let the program run.
This thread was discussing debug_assert, where the assertions are compiled out in release code.