From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPak6-000122-S2 for guix-patches@gnu.org; Wed, 21 Nov 2018 17:13:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPak4-0000Yj-Ha for guix-patches@gnu.org; Wed, 21 Nov 2018 17:13:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:36029) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gPak4-0000Xl-8V for guix-patches@gnu.org; Wed, 21 Nov 2018 17:13:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gPak3-00044a-V9 for guix-patches@gnu.org; Wed, 21 Nov 2018 17:13:04 -0500 Subject: [bug#33215] [PATCH 05/11] guix: Add clojure-utils. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87muquhcw3.fsf@gmail.com> <871s86hck1.fsf@gmail.com> <87tvkbv2gg.fsf@gnu.org> <875zwq8pmd.fsf@gmail.com> Date: Wed, 21 Nov 2018 23:12:12 +0100 In-Reply-To: <875zwq8pmd.fsf@gmail.com> (Alex Vong's message of "Wed, 21 Nov 2018 22:35:54 +0800") Message-ID: <878t1mqdvn.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Alex Vong Cc: 33215@debbugs.gnu.org Hi Alex, Alex Vong skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: [...] >>> +(define-syntax-rule (define-with-docs name docs val) >>> + "Create top-level variable named NAME with doc string DOCS and value= VAL." >>> + (begin (define name val) >>> + (set-object-property! name 'documentation docs))) >> >> This is not necessarily a bad idea, but in general I=E2=80=99m very much= in >> favor of consistency: since we don=E2=80=99t use this anywhere else, I= =E2=80=99d rather >> not have it here either. We could discuss it separately, but IMO it >> shouldn=E2=80=99t be buried in a Clojure patch. >> >> Thus I=E2=80=99d be in favor of using the same style in this file as in = the rest >> of Guix. >> >> WDYT? >> > No problem, I am happy to replace the doc string by a comment > instead. IMO, providing doc string for variables in addition to > procedures is more consistent [in a different way :)] since a procedure > is just a special kind of variable. For example, 'defvar' in Emacs > allows one to specify a doc string. Yeah, that=E2=80=99s why I think it=E2=80=99s not necessarily a bad idea in= itself, it=E2=80=99s just something we don=E2=80=99t currently do in Guile Scheme. :-) > Besides, I thought it is okay to use custom syntactic form within a > module (as long as it doesn't break other's code). However, I can see > that the way I use it can be confusing since everyone are used to > defining variable via 'define'. Is this what you have in mind when you > wrote that you are in favor of consistency? Yes, I think it makes it easier for people to find their way in the code base and get started hacking it if it has somewhat consistent conventions. Of course coding style may vary a bit from module to module and that=E2=80=99s fine, but overall I think we should try to use the same =E2=80=9Cbase language=E2=80=9D so to speak. WDYT? Having said that, I realize I was probably too grumpy when I wrote this, and I didn=E2=80=99t mention the main point, which is that this Clojure bui= ld system looks really nice to me! It=E2=80=99ll surely make it easier to add= more Clojure packages=E2=80=94now all we need is an importer to make that even smoother. :-) Thank you, Ludo=E2=80=99.