logoalt Hacker News

gpderetta • today at 2:38 PM • 1 reply • view on HN

they are literally meant to be better asserts, that can be shown on a function declaration.


Replies

cogman10 • today at 2:42 PM

Well, except for the fact that asserts can be used during debugging to do input validation while these shouldn't be used for that. They also introduced `contract_assert` which seems to have no benefit over assert other than it's more likely to not be disabled.

➕ show 2 replies