From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Rationalising c[ad]\{2,5\}r. Date: Sun, 5 Apr 2015 13:00:30 +0000 Message-ID: <20150405130030.GB28913@acm.fritz.box> References: <20150311214324.GA2952@acm.fritz.box> <87zj7jb2p2.fsf@zigzag.favinet> <20150311230054.GB2952@acm.fritz.box> <20150313164124.GA3972@acm.fritz.box> <20150313213655.GB3972@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1428238868 6673 80.91.229.3 (5 Apr 2015 13:01:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 Apr 2015 13:01:08 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 05 15:01:00 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YekAe-00062Z-1v for ged-emacs-devel@m.gmane.org; Sun, 05 Apr 2015 15:01:00 +0200 Original-Received: from localhost ([::1]:36416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YekAd-0007My-Ad for ged-emacs-devel@m.gmane.org; Sun, 05 Apr 2015 09:00:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YekAQ-0007Mh-Oy for emacs-devel@gnu.org; Sun, 05 Apr 2015 09:00:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YekAL-0004uf-Oz for emacs-devel@gnu.org; Sun, 05 Apr 2015 09:00:46 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:18940 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YekAL-0004uW-CQ for emacs-devel@gnu.org; Sun, 05 Apr 2015 09:00:41 -0400 Original-Received: (qmail 40948 invoked by uid 3782); 5 Apr 2015 13:00:39 -0000 Original-Received: from acm.muc.de (pD9518044.dip0.t-ipconnect.de [217.81.128.68]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 05 Apr 2015 15:00:37 +0200 Original-Received: (qmail 30669 invoked by uid 1000); 5 Apr 2015 13:00:30 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:184922 Archived-At: Hello, Stefan I've finally committed this change (getting rid of cl-caddr, etc.). make bootstrap works with it. As you requested over course of the thread, c[ad]\{3,4\}r remain in cl-lib.el with obsolete aliases for the cl-.. names, there are no c[ad]\{5\}r, and the defsubsts for caar, cadr, cdar, and cddr in subr.el are now defuns with a compiler macro. eudc-cadr, and friends, have simply vanished. On Fri, Mar 13, 2015 at 07:00:20PM -0400, Stefan Monnier wrote: > > I don't know how many of them require other bits of CL. But the point > > is that CL is not loaded by default, so any use of cXXXr in standard > > files is awkward. I'm thinking in particular about my new fix-re.el > > here. > You can use cl-lib freely in most files. The only exception is for > preloaded files which can only (eval-when-compiler (require 'cl-lib)) > (with some further exceptions for the earliest files, for obvious > reasons of bootstrap limitations). > So you can (eval-when-compiler (require 'cl-lib)) in fix-re.el without > any hesitation. IOW no need to add anything to subr.el for that. > This said, fix-re.el seems to be the quintessential example of abuse of > heaps of car/cdr which make the code unreadable. > > OK, fair enough. But unless we're talking about doing cXXXr needlessly > > in a tight loop, it's hardly going to make a noticeable difference. > Agreed. > > 1. All c[ad]\{3,4\}r are now declared in subr.el, generated from macros. > I'm still not convinced it's a good idea to add those to subr.el. > > 2. Each of these has a cl-cXXXr as an alias, declared as obsolete as > > from 25.1. > These aliases and obsolescence settings would belong in cl-lib.el. > > 3. caar, cadr, cdar, and cddr are now declared as defuns (changed from > > defsubsts). > > 4. All the cXXr, including caar, etc., use the compiler macro > > `compiler-macro-cXXr' (renamed by removing "cl-" from the name). > Please keep a "--" in the name to indicate it's an internal function. > For lack of a good prefix, I'd use "internal--". > Stefan -- Alan Mackenzie (Nuremberg, Germany).