Received: from spf3.us4.outblaze.com (spf3.us4.outblaze.com [205.158.62.25]) by sdf.lonestar.org (8.12.10/8.12.10) with ESMTP id iA85Xbas020963 for ; Mon, 8 Nov 2004 05:33:37 GMT Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by spf3.us4.outblaze.com (Postfix) with ESMTP id 43753544EF for ; Mon, 8 Nov 2004 05:33:36 +0000 (GMT) Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CR2I9-0006X0-52 for migo@homemail.com; Mon, 08 Nov 2004 00:42:13 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CR2HY-0006Tz-F0 for gnu-arch-users@gnu.org; Mon, 08 Nov 2004 00:41:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CR2HX-0006TV-Ka for gnu-arch-users@gnu.org; Mon, 08 Nov 2004 00:41:35 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CR2HX-0006TG-Fp for gnu-arch-users@gnu.org; Mon, 08 Nov 2004 00:41:35 -0500 Received: from [210.143.35.52] (helo=tyo202.gate.nec.co.jp) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CR294-0000Ni-It; Mon, 08 Nov 2004 00:32:51 -0500 Received: from mailgate3.nec.co.jp (mailgate53.nec.co.jp [10.7.69.161] (may be forged)) by tyo202.gate.nec.co.jp (8.11.7/3.7W01080315) with ESMTP id iA85Wkn01673; Mon, 8 Nov 2004 14:32:47 +0900 (JST) Received: (from root@localhost) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id iA85WkU29944; Mon, 8 Nov 2004 14:32:46 +0900 (JST) Received: from edsgm01.lsi.nec.co.jp ([10.50.208.11]) by mailsv.nec.co.jp (8.11.7/3.7W-MAILSV-NEC) with ESMTP id iA85Wjx05828; Mon, 8 Nov 2004 14:32:45 +0900 (JST) Received: from mcsss2.ucom.lsi.nec.co.jp (localhost [127.0.0.1]) by edsgm01.lsi.nec.co.jp (8.12.10/8.12.10) with ESMTP id iA85WhUH016756; Mon, 8 Nov 2004 14:32:44 +0900 (JST) Received: from mctpc71 (mctpc71.ucom.lsi.nec.co.jp [10.30.118.121]) by mcsss2.ucom.lsi.nec.co.jp (8.12.10/8.12.8/EDcg v2.01-mc/1046780839) with ESMTP id iA85Whwt011183; Mon, 8 Nov 2004 14:32:43 +0900 (JST) Received: by mctpc71 (Postfix, from userid 31295) id 1F17A40E; Mon, 8 Nov 2004 14:32:43 +0900 (JST) To: xtla-el-dev References: <20041107225337.GA29137@fencepost> From: Miles Bader System-Type: i686-pc-linux-gnu Blat: Foop Date: Mon, 08 Nov 2004 14:32:43 +0900 In-Reply-To: (Matthieu Moy's message of "Mon, 08 Nov 2004 00:37:05 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: gnu-arch-users Subject: [Gnu-arch-users] Dubious coding practice in xtla X-BeenThere: gnu-arch-users@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Miles Bader List-Id: a discussion list for all things arch-ish List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: gnu-arch-users-bounces+migo=homemail.com@gnu.org Errors-To: gnu-arch-users-bounces+migo=homemail.com@gnu.org Status: RO Content-Length: 1564 Lines: 29 The xtla code seems to contain quite a few instances where a lambda expression is quoted using backquote (`) in a non-macro context. This means that the compiler doesn't compile these lambda expressions, and besides the efficiency hit (maybe not a big deal for small code), results in any macros they call being expanded at run-time -- so if they use code from the cl package, (eval-when-compile (require 'cl)) is not sufficient to make them work. For a concrete example, see `tla--revisions-parse-list' in xtla.el; it calls tla--cat-log-any with one of these funny lambdas. I think that these lambda are a bad practice in the first place, and should be replaced with proper lambdas that the compiler can see. I assume the _reason_ for this practice is an attempt to avoid dynamic binding problems with variables bound in the caller and used by the lambda expressions, but while this is a real issue, it's easy enough to work around in vaguely ugly ways (e.g., just use normal binding and give the potentially problematic variables names that are unlikely to conflict; I sometimes prepend the name of the caller for this purpose, e.g., (defun my-funny-function () ... (let ((my-funny-function-var1 ...)) (use-my-lambda (lambda () ... my-funny-function-var1 ...)))) -Miles -- `Life is a boundless sea of bitterness' _______________________________________________ Gnu-arch-users mailing list Gnu-arch-users@gnu.org http://lists.gnu.org/mailman/listinfo/gnu-arch-users GNU arch home page: http://savannah.gnu.org/projects/gnu-arch/