From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id C3ACD6DE0233 for ; Mon, 3 Sep 2018 04:54:07 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.002 X-Spam-Level: X-Spam-Status: No, score=0.002 tagged_above=-999 required=5 tests=[AWL=0.013, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PjZF6UO1ajji for ; Mon, 3 Sep 2018 04:54:06 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 738E76DE0230 for ; Mon, 3 Sep 2018 04:54:06 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1fwnQf-0002WG-2M; Mon, 03 Sep 2018 07:54:01 -0400 Received: (nullmailer pid 21279 invoked by uid 1000); Mon, 03 Sep 2018 11:54:00 -0000 From: David Bremner To: Tomi Ollila , notmuch@notmuchmail.org Subject: Re: [PATCH 01/15] util: add DEBUG_PRINTF, rename error_util.h -> debug_print.h In-Reply-To: References: <20180830112915.11761-1-david@tethera.net> <20180830112915.11761-2-david@tethera.net> Date: Mon, 03 Sep 2018 08:54:00 -0300 Message-ID: <87zhwyvlt3.fsf@unb.ca> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Sep 2018 11:54:07 -0000 Tomi Ollila writes: > To me, YAGNI says that we could drop the whole _debug_printf() and > have > #include > #define DEBUG_PRINTF(format, ...) fprintf(stderr, format " (%s).\n", \ > ##__VA_ARGS__, __location__) > > (but if there is need, then perhaps the lib code inside #ifdef DEBUG_PRINT > ... hmm, but, outside of this context, would this also move > _internal_error() to debug_print ;O )? I guess that version could just go in notmuch-private.h, since it isn't (currently) used in the CLI. Or even directly in thread.cc, since that's the only place it's used currently. d