From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Rationalising c[ad]\{2,5\}r. Date: Fri, 13 Mar 2015 19:00:20 -0400 Message-ID: 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 X-Trace: ger.gmane.org 1426287661 19531 80.91.229.3 (13 Mar 2015 23:01:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Mar 2015 23:01:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 14 00:00:52 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 1YWYZX-0000oT-V3 for ged-emacs-devel@m.gmane.org; Sat, 14 Mar 2015 00:00:52 +0100 Original-Received: from localhost ([::1]:38956 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWYZX-000467-4r for ged-emacs-devel@m.gmane.org; Fri, 13 Mar 2015 19:00:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47186) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWYZ6-000461-9w for emacs-devel@gnu.org; Fri, 13 Mar 2015 19:00:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWYZ3-00014i-4T for emacs-devel@gnu.org; Fri, 13 Mar 2015 19:00:24 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:54621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWYZ3-00014c-1U for emacs-devel@gnu.org; Fri, 13 Mar 2015 19:00:21 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArsTAPOG1lRFxLnr/2dsb2JhbABbgwaDX4VTwGUEAgKBDUQBAQEBAQF8hA0BBAFWIwULCw4mEhQYDSSIOAjOIwEBAQcCAR+PeAeEKgWNOIwngwONEIFFIoICHIFsIoJzAQEB X-IPAS-Result: ArsTAPOG1lRFxLnr/2dsb2JhbABbgwaDX4VTwGUEAgKBDUQBAQEBAQF8hA0BBAFWIwULCw4mEhQYDSSIOAjOIwEBAQcCAR+PeAeEKgWNOIwngwONEIFFIoICHIFsIoJzAQEB X-IronPort-AV: E=Sophos;i="5.09,536,1418101200"; d="scan'208";a="113509102" Original-Received: from 69-196-185-235.dsl.teksavvy.com (HELO pastel.home) ([69.196.185.235]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Mar 2015 19:00:20 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 36174FA0; Fri, 13 Mar 2015 19:00:20 -0400 (EDT) In-Reply-To: <20150313213655.GB3972@acm.fritz.box> (Alan Mackenzie's message of "Fri, 13 Mar 2015 21:36:55 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:183861 Archived-At: > 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