From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uJ8iEiQGH19NOAAA0tVLHw (envelope-from ) for ; Mon, 27 Jul 2020 16:51:48 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 6MzJDSQGH1+wbwAAbx9fmQ (envelope-from ) for ; Mon, 27 Jul 2020 16:51:48 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D9E1B9400E1 for ; Mon, 27 Jul 2020 16:51:46 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 4E47527C31; Mon, 27 Jul 2020 12:51:39 -0400 (EDT) X-Greylist: delayed 491 seconds by postgrey-1.36 at nmbug; Mon, 27 Jul 2020 12:51:37 EDT Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by mail.notmuchmail.org (Postfix) with ESMTPS id 074CF1F9C9 for ; Mon, 27 Jul 2020 12:51:37 -0400 (EDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 03DFF12A8; Mon, 27 Jul 2020 12:43:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 27 Jul 2020 12:43:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=dTz5divr9fGVcRAz5QcxD26eg/ Tkkj5OXWmRu5DZfxs=; b=X9pTFLOtQkAjf5PnNjLS1z2zzvyzdCgyk4HRvf2Tgo mgTTj8NfQgW6DoFjZFjpk+ijTEJCLdoW1NigWJLPv89+N0XS3MV8E8sl4NTIr+tb 8a3JGN17vPR0oUvsKnpCvJDKEADlG3kRKPxPVLTb7mpY01o99/YceX0Xpncw9eyd 9fdnlyYlZ+fxl+1rkrEJbQdHIzhL8GyPBIpzAvMl7Ycv5kJFf9pxANTb9Qt0J/zt HNIroSK+D8DDTKlCNR+FkngYESsEgEor6+pgLBUuhOnoPQ4zbYJipKz8c4r5vISw DO5eGgwHegMx07OZfXApRtghspEJoOMsvO+Hc3PKN/FA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=dTz5di vr9fGVcRAz5QcxD26eg/Tkkj5OXWmRu5DZfxs=; b=EgxQVqnT+IdRLca5nCqKMT j9uhiKUcZg7lou3Qvi6Ks/6ZxlNI45Fnd2yVQpi9x0+PS4QCKEQJmP3pwVboc5uJ PFuR4hCDjR3DKAJpnJkjMrs5WTLgsBNSYYyVzKloFAsX1/6yG2Ke7kUHLtkgqWDf SCIODsrxHRqeOEujgaE3tztejrWKWT804YvO6sKeHFoSuxBP3PHqEitQNlih4elK LvJgdTamXAOE4UxgBh471/ZObc2LnrB1iod4+h4RXS39jbnjVaLytU8IyIc0U2nN KrUeD1haMxGRuYHjhkxmqIGotQepVvkhtjdMHrbLReSksRCCAKIK004yn3hPJ/Jw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedriedtgddutdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufgjfhffkfggtgesthdtredttddttdenucfhrhhomhepufgvrghnucgh hhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqeenuc ggtffrrghtthgvrhhnpeegtddvheegfffhffdvfeefhffgjefflefhteevffffkeetgfdt jedtiedvtdevheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg X-ME-Proxy: From: Sean Whitton To: Jonas Bernoulli , notmuch@notmuchmail.org Subject: Re: [PATCH 07/23] emacs: Use 'and' instead of 'when' when the return value matters In-Reply-To: <871rkykk8w.fsf@bernoul.li> References: <20200726165818.400-1-jonas@bernoul.li> <20200726165818.400-8-jonas@bernoul.li> <87365ege67.fsf@iris.silentflame.com> <871rkykk8w.fsf@bernoul.li> Date: Mon, 27 Jul 2020 09:43:20 -0700 Message-ID: <87mu3kc3iv.fsf@iris.silentflame.com> MIME-Version: 1.0 Message-ID-Hash: S5EL73H7GBSEZXYDEAJWNMEMLIHWBJZ2 X-Message-ID-Hash: S5EL73H7GBSEZXYDEAJWNMEMLIHWBJZ2 X-MailFrom: spwhitton@spwhitton.name X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=spwhitton.name header.s=fm3 header.b=X9pTFLOt; dkim=fail (body hash did not verify) header.d=messagingengine.com header.s=fm3 header.b=EgxQVqnT; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: 0.03 X-TUID: SEdXdG4WQBLM Hello, On Mon 27 Jul 2020 at 12:02AM +02, Jonas Bernoulli wrote: > Sean Whitton writes: > >> On Sun 26 Jul 2020 at 06:58PM +02, Jonas Bernoulli wrote: >> >>> Also do so for some 'if' forms that lack an ELSE part. >>> Even go as far as using 'and' and 'not' instead of 'unless'. >> >> I don't follow "when the return value matters", could you explain? > > As in "when the caller consumes the returned value". The alternative > would be for the caller to not care about the value returned by the > callee and to instead call it for the side-effects only. > > By using `and' we can signal that care about the return value and by > using `when' that we care about the side-effects instead. Thank you for your reply. Just to confirm, this is just a convention, right? I hadn't come across it yet. -- Sean Whitton