logoalt Hacker News

IshKebabyesterday at 10:55 PM2 repliesview on HN

Assert doesn't work like that in any language.


Replies

comexyesterday at 11:02 PM

It does in Rust: assert is always enabled, whereas the debug-only version is called debug_assert.

But yes, “assert” in most languages is debug-only.