From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur Subject: Re: is using eval good style in guile? Date: Sat, 26 Nov 2016 22:55:58 +0100 Message-ID: <87ziklx5w1.fsf@lassieur.org> References: <20161016143347.38d8a6f2@polymos.lepiller.eu> <87shrlzd0w.fsf@gnu.org> <20161026214507.45445d14@lepiller.eu> <87y41aklqp.fsf@gnu.org> <20161027195949.354cae8e@lepiller.eu> <87pomhse6w.fsf@gnu.org> <87lgx0txz0.fsf@gnu.org> <87h97n1iu0.fsf@gnu.org> <20161104190129.684844b4@lepiller.eu> <20161104231253.4b52d70f@lepiller.eu> <4b44538a-ed70-aacd-4867-5267847aee42@crazy-compilers.com> <87wpgg1q7s.fsf@gnu.org> <20161120134958.109870e3@lepiller.eu> <87ziknvnis.fsf@lassieur.org> <583824AC.5080509@goebel-consult.de> <8760nbg02p.fsf@igalia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAkx5-0004ZL-E1 for guix-devel@gnu.org; Sat, 26 Nov 2016 16:56:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cAkx2-0003Lz-Bu for guix-devel@gnu.org; Sat, 26 Nov 2016 16:56:07 -0500 Received: from mail.lassieur.org ([83.152.10.219]:47724) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cAkx2-0003Ij-1p for guix-devel@gnu.org; Sat, 26 Nov 2016 16:56:04 -0500 In-reply-to: <8760nbg02p.fsf@igalia.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Andy Wingo Cc: guix-devel@gnu.org, Hartmut Goebel Andy Wingo writes: > On Fri 25 Nov 2016 12:46, Hartmut Goebel w= rites: > >> Am 25.11.2016 um 11:53 schrieb Cl=C3=A9ment 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 ba= d >> 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