Comment

Comment by abcd_f

As they used to say on slashdot:

From the "C++ design committee was so preoccupied with whether they could, they never stopped to think whether they should" department.

Asserts:

1. You don't like the being conditional on NDEBUG ot aborting the program - roll out your own. Will still be a one-liner.

2. You want them act as documentation of pre-conditions in headers - just add a comment there.

The only somewhat reasonable development here are the post conditions for functions with multiple returns, but post/s are dramatically less common than pre/s, so their utility is also debatable.

parent abcd_f 16 days ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton