From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sHihDUOXfmP81wAAbAwnHQ (envelope-from ) for ; Wed, 23 Nov 2022 22:57:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id uFK7DEOXfmM8rQAAG6o9tA (envelope-from ) for ; Wed, 23 Nov 2022 22:57:23 +0100 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 064F5A042 for ; Wed, 23 Nov 2022 22:57:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxxjl-0004Gt-1c; Wed, 23 Nov 2022 16:56:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxxjj-0004Gl-JC for guix-devel@gnu.org; Wed, 23 Nov 2022 16:56:55 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxxji-0001g5-9F; Wed, 23 Nov 2022 16:56:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=m3y37V1gHFjh1IC7kg9MEAoVp40dZ26PbmjK5ha9oxg=; b=Wj0bzSE+qBXoV2p8NSfw YtefIOcg27y/gE1iZB84xAesCqgwOcASWEI635Zedjajwc7Yf1ZY0x+9owNmgtK9CbwMbcarZvCV3 VB19Bozd9GLqy/RI/efp65cC316+rInyvbPu5hanpg1Z70oB7cf0dJPQchZHd3DcddN87HG9grjc+ SVo7nT7GXcuSBx467CyFOYRlMQa13PGiuUM9PfV/vR058ZCNZO0Cqg0mywpzosfsjPrN4DeA7HOEM HeqNPqNy50AZiQlapSim/g+02lUoAeJJTE5DBPqTdOQ5GiEk/YhQWGpP1i4Z8vKoaDPczOhVJoOep dEBIUV8SFTMpoA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxxjh-0004qF-LO; Wed, 23 Nov 2022 16:56:53 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Cc: guix-devel@gnu.org Subject: Re: Layout of =?utf-8?Q?=E2=80=98define-configuration=E2=80=99?= records References: <20221029034716.11125-1-maxim.cournoyer@gmail.com> <20221029041649.12144-1-maxim.cournoyer@gmail.com> <87zgcpdx6q.fsf_-_@gnu.org> <8735ag43ga.fsf@gmail.com> <87zgckli8u.fsf@gnu.org> <87edtwqa87.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Tridi 3 Frimaire an 231 de la =?utf-8?Q?R=C3=A9volut?= =?utf-8?Q?ion=2C?= jour de la =?utf-8?Q?Chicor=C3=A9e?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 23 Nov 2022 22:56:51 +0100 In-Reply-To: <87edtwqa87.fsf@gmail.com> (Maxim Cournoyer's message of "Mon, 21 Nov 2022 16:16:40 -0500") Message-ID: <874jupfi70.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1669240643; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=m3y37V1gHFjh1IC7kg9MEAoVp40dZ26PbmjK5ha9oxg=; b=qB19XEmyF1u0yYEYhCR+bvyYLlyLmCBPXFo9UUbR4//s4LRq1soPwg92RpVTAP4RTVjeAs cWwuml3RyRfJOKlL6PVY7Tih7/+XLt72LNJt5P60hVz7qoBfaLSDuAznY77854OuH+oTSB 09yxjCuTm592wKDhXH1XDeGCKUmBCDmgL67gZ4FQgIvV2ZQlkNOoPoqku9ru4eYoNp7I2S 1fGc0hSrc0FiQpRQnM8RKp9wOwEfG7DIb3SuQDe7/5WucODbedWxDZvN9VGfku2+AicHWq tFDi+1RZeSpYQ86YaL4iaVD1ypFkKIc35lFBsTXcsRQ1/CBOo1i0j4vCN12Djg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669240643; a=rsa-sha256; cv=none; b=OXazUOLDMfgOG16zsHt/iVh+Qs2sSHaGzf8QV8QPmJwLi+joDQTlvWg45qZsxlZ7BmRBde ENd+ZAFAzjR1mEiVBBxRVJJrnda0pQjP3nHufbRw3NHIWjdWv9hHhURp1o8eDsartWNo4C g/K0bAnI4PQ2VQoSIIwkuXHosKK3f2gt10Kp8/qlXjf3O7lcrM+iREZFcuQEUtRUWTNvEO gHBcHig4SLDueQDp2v7fMpGOxtf7rRcRnbNj2iLZyyjqIgJaXsf6t6KUxejEIM/LVfWIIT jq68au5VykiR3YT9QI5xqoRr8HsZB5XmrZJQ6SfYbas3rzov9XdnSzeM+nSXQA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=Wj0bzSE+; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.19 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=Wj0bzSE+; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 064F5A042 X-Spam-Score: -5.19 X-Migadu-Scanner: scn1.migadu.com X-TUID: X4jaRNHopKt9 Hi, Maxim Cournoyer skribis: > Ludovic Court=C3=A8s writes: [...] >>>> One last thing: placing =E2=80=98%location=E2=80=99 first can let us i= mplement: >>>> >>>> (define (configuration-location config) >>>> (struct-ref config 0)) >>> >>> Would this have worked? >>> >>> scheme@(gnu services mcron)> (define config (mcron-configuration)) >>> scheme@(gnu services mcron)> (struct-ref 0 config) >> >> You got the order wrong. :-) > > Ah! Thanks for pointing my silly mistake. Then the argument would > become... if it's good for define-configuration, it should have been > good for define-record-type* the same (why the discrepancy?). =E2=80=98define-record-type*=E2=80=99 is generic; there=E2=80=99s no reason= for it to add a =E2=80=98location=E2=80=99 field. > After your new documentation in place to guide users to DTRT with > regards to matching records, if you think %location should be the first > field, then we should make it so in both instances, perhaps? =E2=80=98%location=E2=80=99 only appears in =E2=80=98define-configuration= =E2=80=99; what did you mean by =E2=80=9Cboth instances=E2=80=9D? > Oops! Another point to add to our future coding style guidelines :-). In the end, I guess the lesson is that, indeed, not all the design choices and rationales are properly documented. That=E2=80=99ll always be = the case to a large extent though, so changes =E2=80=9Cclose to the core=E2=80= =9D require more careful review and discussion to fully understand the implications of the change=E2=80=94it might look innocuous but have broader implications= than expected. Thanks, Ludo=E2=80=99.