all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: Rationalising c[ad]\{2,5\}r.
Date: Fri, 13 Mar 2015 19:00:20 -0400	[thread overview]
Message-ID: <jwvlhj0pmom.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20150313213655.GB3972@acm.fritz.box> (Alan Mackenzie's message of "Fri, 13 Mar 2015 21:36:55 +0000")

> 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



  reply	other threads:[~2015-03-13 23:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11 21:43 Rationalising c[ad]\{2,5\}r Alan Mackenzie
2015-03-11 22:00 ` Drew Adams
2015-03-11 22:54   ` Artur Malabarba
2015-03-12  1:51     ` Drew Adams
2015-03-12  9:54       ` Artur Malabarba
2015-03-12 14:01         ` Drew Adams
2015-03-12  4:34     ` Stephen J. Turnbull
2015-03-12 10:15       ` Artur Malabarba
2015-03-12 10:30   ` Alan Mackenzie
2015-03-12 14:03     ` Drew Adams
2015-03-11 22:15 ` Thien-Thi Nguyen
2015-03-11 23:00   ` Alan Mackenzie
2015-03-11 23:36     ` Thien-Thi Nguyen
2015-03-12  1:35       ` Samuel W. Flint
2015-03-12  0:52     ` Artur Malabarba
2015-03-12  8:56       ` Alan Mackenzie
2015-03-12 10:15         ` Artur Malabarba
2015-03-12 13:53     ` Stefan Monnier
2015-03-13 16:41       ` Alan Mackenzie
2015-03-13 16:47         ` Drew Adams
2015-03-13 20:38         ` Stefan Monnier
2015-03-13 21:36           ` Alan Mackenzie
2015-03-13 23:00             ` Stefan Monnier [this message]
2015-04-05 13:00               ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvlhj0pmom.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.