[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Rationalising c[ad]\{2,5\}r.

From: Drew Adams
Subject: RE: Rationalising c[ad]\{2,5\}r.
Date: Wed, 11 Mar 2015 18:51:45 -0700 (PDT)

> >> 1. caar,  cadr, cdar, and cddr are defined in subr.el;
> >> 2. c[ad]\{3,4\}r are actually called cl-caaar, etc;
> >
> > Gag. Why is that?
> My guess is that these were initially defined in `cl.el' (which,
> if that's the case, I agree was a mistake),

It doesn't much matter where they were defined.  They are basic
Lisp.  Who cares where `setq' is defined, in terms of modularity
or namespaces?

> and afterwards all cl functions were renamed to `cl-' prefixes by
> cl-lib (in the process of abolishing `cl.el').

That was an even bigger mistake - doing that systematically, I mean.
`cl-car', `cl-cdr',...  Sheesh - what silliness.

Also: bug #20056: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20056

`car' is Lisp.  It is not special to Common Lisp.
`letf' is Emacs Lisp.  It is not Common Lisp.

Neither should get the `cl-' prefix.  Neither is emulating
Common Lisp, and neither is confusable with something else
already existing in Emacs Lisp.

> >> and there will be compatibility aliases for cl-caaadr etc..
> >
> > Why? Why is that needed?
> To not make it harder for developers to support Emacs 24.X

Well, if you mean keeping `caaadr', then yes.  It's `cl-caaadr'
that has no raison d'etre.  Keep `caaadr'; toss `cl-caaadr'.
No need for any aliasing then to make things easier for
"developers to support Emacs 24.X".

Putting it like you did is trying to make a virtue out of
necessity (or a purse out of a sow's ear, if you prefer).
Given the existence of `cl-caaadr', yes, of course we would
then need to alias `caaadr' to it.  Get rid of `cl-caaadr',
and no, no aliasing is needed.

> > Has this slick cl-* paint job perhaps gotten out of hand?
> Well, it's not exactly getting worse. It's the same it's always
> been, isn't it?

See above.  Yes, this kind of thing is worse, IMHO.  And no,
prefix `cl-' has not always been applied to such things.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]