public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: "Kyle J. McKay" <mackyle@gmail•com>,
	Johannes Schindelin <Johannes.Schindelin@gmx•de>,
	Jonathan Tan <jonathantanmy@google•com>,
	Git mailing list <git@vger•kernel.org>
Subject: Re: [PATCH] mailinfo.c: move side-effects outside of assert
Date: Thu, 22 Dec 2016 09:57:25 -0800	[thread overview]
Message-ID: <xmqq7f6rhmnu.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20161222033418.dmslmuhq7mqhmkwq@sigill.intra.peff.net> (Jeff King's message of "Wed, 21 Dec 2016 22:34:19 -0500")

Jeff King <peff@peff•net> writes:

> Well, no, I mostly just said that I do not think there is any point in
> defining NDEBUG in the first place, as there is little or no benefit to
> removing those asserts from the built product.
> ...
> Sure, if you want to mass-convert them, doing so with a macro similar to
> assert is the simplest way. I don't think we are in a huge hurry to do
> that conversion though. I'm not complaining that NDEBUG works as
> advertised by disabling asserts. I'm just claiming that it's largely
> pointless in our code base, and I'd consider die("BUG") to be our
> "usual" style. 

I agree with all of the above. Given the way how our own code uses
assert(), there is little point removing them and turning them over
time into "if (...) die(BUG)" would probably be better.

Borrowed code like nedmalloc may be a different story, but as you
said in a separate message in this thread, I think we are better off
leaving that to those who care about that piece of code.

  reply	other threads:[~2016-12-22 17:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-17 19:54 [PATCH] mailinfo.c: move side-effects outside of assert Kyle J. McKay
2016-12-19 17:45 ` Johannes Schindelin
2016-12-19 20:03 ` Jeff King
2016-12-19 20:38   ` Kyle J. McKay
2016-12-19 20:54     ` Jonathan Tan
2016-12-19 21:01       ` Junio C Hamano
2016-12-19 23:13         ` [PATCH v2] " Kyle J. McKay
2016-12-19 23:26           ` Junio C Hamano
2016-12-19 23:54             ` [PATCH v3] " Kyle J. McKay
2016-12-20 14:12     ` [PATCH] " Johannes Schindelin
2016-12-20 16:45       ` Jeff King
2016-12-21  5:54         ` Kyle J. McKay
2016-12-21 15:55           ` Jeff King
2016-12-22  2:21             ` Kyle J. McKay
2016-12-22  3:34               ` Jeff King
2016-12-22 17:57                 ` Junio C Hamano [this message]
2016-12-22  3:53               ` Kyle J. McKay
2016-12-22  3:59                 ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq7f6rhmnu.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=Johannes.Schindelin@gmx$(echo .)de \
    --cc=git@vger$(echo .)kernel.org \
    --cc=jonathantanmy@google$(echo .)com \
    --cc=mackyle@gmail$(echo .)com \
    --cc=peff@peff$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox