From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/54972 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.gnus.general Subject: Re: Using CL in Gnus Date: Fri, 28 Nov 2003 18:08:01 +0100 Sender: ding-owner@lists.math.uh.edu Message-ID: References: <87oev1uyzw.fsf@zip.com.au> <87k75oktn7.fsf@zip.com.au> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1070039421 3905 80.91.224.253 (28 Nov 2003 17:10:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Nov 2003 17:10:21 +0000 (UTC) Original-X-From: ding-owner+M3512@lists.math.uh.edu Fri Nov 28 18:10:18 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1APm8I-0008Ex-00 for ; Fri, 28 Nov 2003 18:10:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1APm81-000552-00; Fri, 28 Nov 2003 11:10:01 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1APm7u-00054u-00 for ding@lists.math.uh.edu; Fri, 28 Nov 2003 11:09:54 -0600 Original-Received: from pfepb.post.tele.dk (pfepb.post.tele.dk [193.162.153.3]) by justine.libertine.org (Postfix) with ESMTP id 9BEC63A0034 for ; Fri, 28 Nov 2003 11:09:52 -0600 (CST) Original-Received: from [195.215.224.152] (0xc3d7e098.esnxr4.ras.tele.dk [195.215.224.152]) by pfepb.post.tele.dk (Postfix) with ESMTP id 7CACE5EE2EF for ; Fri, 28 Nov 2003 18:09:50 +0100 (CET) Original-To: ding@gnus.org Mail-Followup-To: ding@gnus.org In-Reply-To: (Karl =?iso-8859-1?q?Pfl=E4sterer's?= message of "Fri, 28 Nov 2003 17:30:54 +0100") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:54972 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:54972 sigurd@12move.de (Karl Pfl=E4sterer) writes: > `dolist' could be used here. That's in cl-macs.el so could be used > with eval-when-compile and for a reader is easier to see what > happens (IMO). In Emacs 21.3 `dolist' has been promoted to subr.el, so it's not even necessary to eval-when-compile. > If we start No Gnus we should look for a lot of places in the code > where mapping over a list is written like that: > > (let ((lst inputlist)) > (while lst > (do-something-with-list lst) > . > (setq lst (cdr lst)))) > > To cdr-down a list is not uncommon (above code would be nicer as > recursive version) but `dolist' is IMO a much better alternative at > such places. Yes. But in a lot of places the list isn't copied first. In that case -- and if speed matters -- `dolist' would degrade performance and consing slightly.