guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: is using eval good style in guile?


From: Clément Lassieur
Subject: Re: is using eval good style in guile?
Date: Sat, 26 Nov 2016 22:55:58 +0100
User-agent: mu4e 0.9.16; emacs 25.1.1

Andy Wingo <address@hidden> writes:

> On Fri 25 Nov 2016 12:46, Hartmut Goebel <address@hidden> writes:
>
>> Am 25.11.2016 um 11:53 schrieb Clément Lassieur:
>>> I think you are looking for "eval".
>>>
>>> (define (list->define-configuration stem fields)
>>>   (eval `(define-configuration ,stem ,@fields) (current-module)))
>>
>> I'm curious: In other programming languages, using eval is regarded bad
>> programming style. Is this different in guile?
>
> No.  Eval is generally bad style :)  If it can be avoided it should be
> avoided.  I think since this is a definition form, macros are the
> appropriate thing if possible (I haven't seen the larger patch).

Oh sorry for that then. The larger patch is there:
http://lists.gnu.org/archive/html/guix-devel/2016-11/msg01048.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]