From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kMPoMWlfi2IlKAAAbAwnHQ (envelope-from ) for ; Mon, 23 May 2022 12:18:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aF/eMWlfi2Kz5gAAauVa8A (envelope-from ) for ; Mon, 23 May 2022 12:18:17 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 14FA614416 for ; Mon, 23 May 2022 12:18:17 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id F278F5F6BC; Mon, 23 May 2022 10:18:12 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 7F7215F5E3 for ; Mon, 23 May 2022 10:18:10 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 5E9285FBD7; Mon, 23 May 2022 06:18:08 -0400 (EDT) Received: (nullmailer pid 2880684 invoked by uid 1000); Mon, 23 May 2022 10:18:07 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: RFC: drop notmuch_private_status_t, or use it better? X-List-To: notmuch Date: Mon, 23 May 2022 07:18:07 -0300 Message-ID: <87wnec8sdc.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: JR24FJQAL2GBOUOHOYBVVFGMR76AP4JQ X-Message-ID-Hash: JR24FJQAL2GBOUOHOYBVVFGMR76AP4JQ X-MailFrom: david@tethera.net 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; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653301097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=gpiR+xO8WxlUhpip7jaHHffJj1yg9tvb3cEnYA34kkM=; b=ONtW6FeoTPRp4k7W2dMa2erNEFLgg4ktpZrqj2kN1wgIrD2bZhRUJdvWTNdcZLwIqa3Gxo efL2fRW+A/S3+yd5OmZwjecv8jwRZQTVDUmSSPlYSnzcGD+T+8bqTedwOZIIzDUtt9zZaz le6TRW4IipvgjJMSz1Omi2YJjyfyUVFaOHPlmw6sMsw6Jfgk8jL8hHkmcyMnSXelMWVQWP H60oL3YeE4xEkZs8mX90wXN+Z/4UK2oZ0WgijHnFBNamr/VFziMKQ9x6o8MZazlE5eju0p F/opb06h5l3qq7/CGUYfU5dMyAR/VjlV3Z9TpDEW2BPpTrodQRabqXhXAOMd2A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653301097; a=rsa-sha256; cv=none; b=qkSu8I+PDXjQvMKB38Wxe94boNclh9Xvg/ca14pmFprMSBh+7TtpNWeBdSY2M2nIuxn841 wFE6a6aAACoO0SGmoZHokSr43BL03Pfu0r6zZAHbNhRZUPGsLDv/JvsR9zn8zbuTUaHM6U J+YL74C7kfQ2f3WsRXvBOOSAOV+qVX+TPTmAQ1uIHk2t+GplOBqx4g90KaQt9QhkLhgFyP hWVSm4VM5fpsyTDXAKyqahMuQAQeyCjRApjyYT5R01tk/Zr5B1n6wEz94CEz96VKGuh4xp ClEG689rOpKcxJdPGkAQDJn2EdUfskWDc/f/l7a/yHywQ0YD7e6jyzmSBV6c/g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.50 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 14FA614416 X-Spam-Score: -1.50 X-Migadu-Scanner: scn0.migadu.com X-TUID: oFp34YgzWOQH This is probably mostly my fault, but we have not really taken advantage of having a private set of status values, and defined only one private status value since 2010. Currently they are mainly a source of extra code (to coerce return values) and potential for error (if / when they get out of sync with the public status values. It occured to me we could relatively easily just drop them (adding 3 status values to the public values). It is true that these three status values would probably never reach user code; I'm just wondering if the simplification of the library would be worth it. Alternatively are we missing an opportunity in the library to add more private status codes and make the code somehow more robust or maintainable? d