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 gK7tMIr9HV/JRgAA0tVLHw (envelope-from ) for ; Sun, 26 Jul 2020 22:02:50 +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 aGsALIr9HV+POwAAbx9fmQ (envelope-from ) for ; Sun, 26 Jul 2020 22:02:50 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (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 718E994005D for ; Sun, 26 Jul 2020 22:02:49 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 64FE5200A5; Sun, 26 Jul 2020 18:02:43 -0400 (EDT) Received: from mail.hostpark.net (mail.hostpark.net [212.243.197.30]) by mail.notmuchmail.org (Postfix) with ESMTPS id BE3461F9FA for ; Sun, 26 Jul 2020 18:02:40 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id D4B98160EA; Mon, 27 Jul 2020 00:02:39 +0200 (CEST) X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail1.hostpark.net [127.0.0.1]) (amavisd-new, port 10124) with ESMTP id w0gj9NLXDYcY; Mon, 27 Jul 2020 00:02:39 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id A7573160BA; Mon, 27 Jul 2020 00:02:39 +0200 (CEST) From: Jonas Bernoulli To: Sean Whitton , notmuch@notmuchmail.org Subject: Re: [PATCH 07/23] emacs: Use 'and' instead of 'when' when the return value matters In-Reply-To: <87365ege67.fsf@iris.silentflame.com> References: <20200726165818.400-1-jonas@bernoul.li> <20200726165818.400-8-jonas@bernoul.li> <87365ege67.fsf@iris.silentflame.com> Date: Mon, 27 Jul 2020 00:02:39 +0200 Message-ID: <871rkykk8w.fsf@bernoul.li> MIME-Version: 1.0 Message-ID-Hash: G47MJ2AQKKO3YH3S3QYL2V4ORNLKUA36 X-Message-ID-Hash: G47MJ2AQKKO3YH3S3QYL2V4ORNLKUA36 X-MailFrom: jonas@bernoul.li 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=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: -0.97 X-TUID: zeNDvPKGV7j2 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.