Contracts, Undefined Behavior, and Defensive,Programming
Kagamin
spam at here.lot
Thu Jun 18 16:16:53 UTC 2020
On Saturday, 13 June 2020 at 03:46:38 UTC, Andrei Alexandrescu
wrote:
> A short and sweet paper:
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1743r0.pdf
>
> It echoes Walter's opinions on contracts vs. runtime checking,
> to a tee. He has been derided on occasion in this group for
> such views. The paper is a good rationale from an independent
> source.
The approach trades security for performance. It can make sense,
just should be opt in. I personally don't care what happens in
release compilation mode, because my code doesn't rely on it, but
many people were taught to use release mode, their code may not
be ready for silent change of behavior.
More information about the Digitalmars-d
mailing list