Re: [PATCH 1/3] Documentation/CodingGuidelines: explain why assert is bad

2017-11-22 Thread Jonathan Nieder
Stefan Beller wrote: > On Wed, Nov 22, 2017 at 2:59 PM, Jonathan Nieder wrote: >> In a certain ideal world, the preference would be reversed: you'd want >> to use assert() wherever you can and require the compiler to check >> that all assert()s are verifiable at compile time. A check that a >> s

Re: [PATCH 1/3] Documentation/CodingGuidelines: explain why assert is bad

2017-11-22 Thread Stefan Beller
On Wed, Nov 22, 2017 at 2:59 PM, Jonathan Nieder wrote: > In a certain ideal world, the preference would be reversed: you'd want > to use assert() wherever you can and require the compiler to check > that all assert()s are verifiable at compile time. A check that a > static analyzer can verify i

Re: [PATCH 1/3] Documentation/CodingGuidelines: explain why assert is bad

2017-11-22 Thread Jonathan Nieder
Hi, Stefan Beller wrote: > --- a/Documentation/CodingGuidelines > +++ b/Documentation/CodingGuidelines > @@ -386,6 +386,9 @@ For C programs: > - Use Git's gettext wrappers to make the user interface > translatable. See "Marking strings for translation" in po/README. > > + - Prefer the BUG

[PATCH 1/3] Documentation/CodingGuidelines: explain why assert is bad

2017-11-22 Thread Stefan Beller
Signed-off-by: Stefan Beller --- Documentation/CodingGuidelines | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index c4cb5ff0d4..4f8791895b 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -