Dr
Matthias Kretz
(GSI Helmholtzzentrum für Schwerionenforschung GmbH(GSI))
10/07/2024, 14:00
Setting expectations
Dr
Matthias Kretz
(GSI Helmholtzzentrum für Schwerionenforschung GmbH(GSI))
10/07/2024, 14:05
Preconditions are the conditions under which a function/operation can be called. If a precondition is violated all things are possible (UB). The effects of hitting UB can be fatal. So why are there people that insist on preconditions (narrow contract) over functions that handle all erroneous inputs (wide contract). And what can you do to guard against coding errors that violate preconditions?...