From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add the related procedures. Date: Tue, 26 Mar 2013 21:50:57 +0100 Message-ID: <87620dx4um.fsf@gnu.org> References: <87obfchq38.fsf@karetnikov.org> <87sj4ok6sc.fsf@gnu.org> <87sj48gxzp.fsf_-_@karetnikov.org> <87lia09khe.fsf@gnu.org> <874ngbcfbl.fsf_-_@karetnikov.org> <87vc8rq6ol.fsf@gnu.org> <877gl0kye8.fsf@karetnikov.org> <87620jk4oi.fsf@gnu.org> <8738vhud12.fsf@karetnikov.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKaps-00076b-TM for bug-guix@gnu.org; Tue, 26 Mar 2013 16:51:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKapo-0001Lc-7W for bug-guix@gnu.org; Tue, 26 Mar 2013 16:51:12 -0400 Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=57757 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKapo-0001JD-1P for bug-guix@gnu.org; Tue, 26 Mar 2013 16:51:08 -0400 In-Reply-To: <8738vhud12.fsf@karetnikov.org> (Nikita Karetnikov's message of "Wed, 27 Mar 2013 00:22:33 +0400") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Nikita Karetnikov Cc: bug-guix@gnu.org Nikita Karetnikov skribis: >> =E2=80=9CEval is evil=E2=80=9D, as lispers love to say. > > Yeah, I've heard this one. > >> It should never be used, unless there=E2=80=99s a very good reason to do= so. > > I've heard this too. But people always fail to explain the "a very good > reason" part. There are many reasons, including: it=E2=80=99s hard to reason about code generated at run time, it=E2=80=99s easy to generate invalid code, generated code cannot be compiled & optimized, and evaluating code is much slower than running compiled code. >> In my unfinished binary substitute where a similar situation arises, >> I=E2=80=99ve done this: > > [...] > >> And then, it is used like this: > >> (alist->record properties >> (cut %make-cache url <...>) >> '("StoreDir" "WantMassQuery")) > > So, keys and values are strings here, right? Keys are strings, and values can be anything. > But I want to store setters as values. The suggestion I made was in favor of using a single =E2=80=98make-gnu-record-descriptor=E2=80=99 call with all the field values= (as opposed to creating the record with all fields set to #f, and then using =E2=80=98setters=E2=80=99 to change them to their actual value.) In the example above, the end result is a single call to the constructor, equivalent to: (%make-cache url (assoc-ref properties "StoreDir") (assoc-ref properties "WantMassQuery")) HTH, Ludo=E2=80=99.