From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uIJgBTFtrl9sTQAA0tVLHw (envelope-from ) for ; Fri, 13 Nov 2020 11:25:37 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id CPAzATFtrl+7NQAA1q6Kng (envelope-from ) for ; Fri, 13 Nov 2020 11:25:37 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CE2909404C6 for ; Fri, 13 Nov 2020 11:25:36 +0000 (UTC) Received: from localhost ([::1]:60512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdXCx-0006qS-P2 for larch@yhetil.org; Fri, 13 Nov 2020 06:25:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdXCG-0006os-LG for guix-devel@gnu.org; Fri, 13 Nov 2020 06:24:52 -0500 Received: from mout-p-201.mailbox.org ([2001:67c:2050::465:201]:61020) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1kdXCE-0003JN-8L; Fri, 13 Nov 2020 06:24:52 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4CXbj717zqzQlX5; Fri, 13 Nov 2020 12:24:43 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendan.scot; s=MBO0001; t=1605266681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E6vgT3bYbLDPlATE61yrBBoB/IKfbklspX0qr3oNbGc=; b=BR0eY6U9ILB8p8JGmoJ5svl8TvPQCwAfhMIZymKnKDJrSSSRQIYftWaJwz+XAYdII3zKDI CdgkLVt2bV0F1RnGEYSuDqSiNcLCQ7B/Lxn8ucmNLc0vL95KdMkB+/QJnL0rFYf1K+3k9X 6SM7BJ9DW0b6Dbj1pbRE3xY4nnhSHsTR4EDPTHswjoPYOudIr7inQAZGb6d6qgchvak4IO coDx4yNK+cqaQUenMTlU0AvYxcPRHpGuqBFE7qGGZvQKJ+OoupXM8zuo52KJlFF4pidTVr oMoXsPYwd5sAGecF1iK7ar+NtQ04t+ABEX3DXcrXH1FWzTqh1TVCnzwczL/Ssg== Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter06.heinlein-hosting.de (spamfilter06.heinlein-hosting.de [80.241.56.125]) (amavisd-new, port 10030) with ESMTP id tttbNl3MtwfX; Fri, 13 Nov 2020 12:24:39 +0100 (CET) Subject: Re: A better way to access records. To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= References: <487cea17-061a-2cc9-6b3e-7b688114d158@brendan.scot> <87sg9urr6k.fsf@gnu.org> From: Brendan Tildesley Message-ID: <657ddf5c-8ee3-7e37-39b0-725df3930f66@brendan.scot> Date: Fri, 13 Nov 2020 22:24:32 +1100 MIME-Version: 1.0 In-Reply-To: <87sg9urr6k.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-MBO-SPAM-Probability: X-Rspamd-Score: -4.60 / 15.00 / 15.00 X-Rspamd-Queue-Id: 39793182C X-Rspamd-UID: b65376 Received-SPF: pass client-ip=2001:67c:2050::465:201; envelope-from=mail@brendan.scot; helo=mout-p-201.mailbox.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=brendan.scot header.s=MBO0001 header.b=BR0eY6U9; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -1.21 X-TUID: +KphnrW5Q80k On 1/11/20 8:01 am, Ludovic Courtès wrote: > Hi, > > Brendan Tildesley skribis: > >> In the guix codebase, on many occasions there appear things like this: >> >> (match-lambda >>     (($ agetty tty term baud-rate auto-login >>         login-program login-pause? eight-bits? no-reset? remote? >> flow-control? >>         host no-issue? init-string no-clear? local-line extract-baud? >>         skip-login? no-newline? login-options chroot hangup? >> keep-baud? timeout >>         detect-case? wait-cr? no-hints? no-hostname? long-hostname? >>         erase-characters kill-characters chdir delay nice extra-options) >>      (list >>       .... > This has officially been Bad Practice for a while. Instead, the > recommended approach is to use ‘match-record’ from (guix records). > There are examples of that primarily in (gnu services …). > > Does that help? > > Thanks, > Ludo’. I suppose It makes sense that one would want to be explicit about names in a source code file. BTW, if that is the recommended way, would someone with an understanding of the records.scm code mind adding support for delayed & thunked fields in match-record? There is a TODO there. I wouldn't know how to do it.