Hacker News new | ask | show | jobs
by cogman10 22 days ago
Agreed. I've not liked the contract setup for various reasons. It seems like the proponents of it are mostly there because it scratches an itch in PL PhD studies rather than being an actually useful feature.

I remain unconvinced as why this is a necessary feature over the already existing `assert` statements.

1 comments

It is currently UB to have assertions enabled in some translation units and not in others. `contract_assert` avoids this. This behaviour seems more than worth it.