Design by Contract (tm)
Languages and libraries
c++ contract library
SHOW HN2020
6points
6comments
#2,758of 3,028 in 2020
Top 92%of 2020 by points
How HN took it
QuietFewer than 5 comments about the project
0 positive, 1 neutral or asking, 0 mixed, 1 critical, out of 2 comments about the project.
Design: 0 for, 1 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
Objections
Runtime contract checks are a performance cost and throwing exceptions on violation is the wrong response
From 2 comments
Every pre-, post-, and invariant condition violation represents a programming error, at an indeterminate point in the past, rendering the state of the computation unknown, and…
ncmncm on HNUh, run-time tests using C-style macros, much like assertions. Frankly, I would have been more impressed by some template/constexpr magic implementing compile-time tests.
guenthert on HN
Requests
Compile-time checks using templates or constexpr instead of runtime macros
From 1 comment
Uh, run-time tests using C-style macros, much like assertions. Frankly, I would have been more impressed by some template/constexpr magic implementing compile-time tests.
guenthert on HN
Questions
What the OLD keyword does
From 1 comment
I don't understand what 'OLD' does. EDIT: Apparently it refers to the variable with the value at the entry point.
progfix on HN