News for hackers. Stuff that matters.
Re:The Compiler Is Your Best Friend, Stop Lying to It by eterm on Wednesday December 31, 2025 @12:43PM (#46446379)
Oh I agree, literally `assert(false, "This cannot happen")` is useless, but ensuring message is always there encourages something more like, `assert(false, "This implies the Foo is Barred, but we have the Qux to make sure it never is")`.

Ensuring a message encourages people to state the assumptions that are violated, rather than just asserting that their assumptions (which?) don't hold.

There are no comments on this comment yet.