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: Andy Wingo
Subject: Re: is using eval good style in guile?
Date: Fri, 25 Nov 2016 14:29:02 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

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).

Andy



reply via email to

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