[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add the re
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add the related procedures. |
Date: |
Tue, 26 Mar 2013 21:50:57 +0100 |
User-agent: |
Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) |
Nikita Karetnikov <address@hidden> skribis:
>> “Eval is evil”, as lispers love to say.
>
> Yeah, I've heard this one.
>
>> It should never be used, unless there’s 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’s hard to reason about code
generated at run time, it’s 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’ve 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
‘make-gnu-record-descriptor’ call with all the field values (as opposed
to creating the record with all fields set to #f, and then using
‘setters’ 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’.
- [PATCH] gnu-maintenance: Replace 'official-gnu-packages' with 'find-packages'., Nikita Karetnikov, 2013/03/06
- Re: [PATCH] gnu-maintenance: Replace 'official-gnu-packages' with 'find-packages'., Ludovic Courtès, 2013/03/06
- [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add the related procedures., Nikita Karetnikov, 2013/03/16
- Re: [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add the related procedures., Ludovic Courtès, 2013/03/22
- Re: [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add the related procedures., Nikita Karetnikov, 2013/03/26
- Re: [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add the related procedures.,
Ludovic Courtès <=
- Re: [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add the related procedures., Nikita Karetnikov, 2013/03/26
- Re: [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add the related procedures., Ludovic Courtès, 2013/03/26
- Re: [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add the related procedures., Nikita Karetnikov, 2013/03/27
- Re: [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add the related procedures., Ludovic Courtès, 2013/03/27
- Re: [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add the related procedures., Ludovic Courtès, 2013/03/31
- Re: [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add the related procedures., Nikita Karetnikov, 2013/03/26
- Re: [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add the related procedures., Ludovic Courtès, 2013/03/26
- [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add related procedures., Nikita Karetnikov, 2013/03/27
- Re: [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add related procedures., Ludovic Courtès, 2013/03/28
- Re: [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add related procedures., Nikita Karetnikov, 2013/03/28