[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rationalising c[ad]\{2,5\}r.
From: |
Alan Mackenzie |
Subject: |
Re: Rationalising c[ad]\{2,5\}r. |
Date: |
Sun, 5 Apr 2015 13:00:30 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
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).
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Rationalising c[ad]\{2,5\}r.,
Alan Mackenzie <=