[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Release of CC Mode 5.31
From: |
Alan Mackenzie |
Subject: |
Re: Release of CC Mode 5.31 |
Date: |
Mon, 5 Dec 2005 16:48:09 +0000 (GMT) |
Hi, Richard!
On Sat, 3 Dec 2005, Richard M. Stallman wrote:
> HEY YOU GUYS (in emacs-devel)! Is there any chance we could have
> mapcan (and possibly the other mapping functions in the table on
> page 85 of the orange Lisp Machine Manual ;-) in the Emacs core for
> 22.1? Please? Pretty Please?
>I don't see any great need for mapcan. It has never been very
>common, and it is easy to do (apply 'nconc (mapcar ...)).
Well, mapcan might be uncommon because it exists only in cl-extra - a
chicken and egg situation.
(apply 'nconc (mapcar ...)) is more difficult to read and understand than
(mapcan ....). The macros in CC Mode's cc-langs.el and cc-defs.el are
difficult enough to understand, even without this added difficulty. This
complexity in CC Mode is, I believe, essential rather than frivolous.
>Since I do not have a copy of the Lisp Machine Manual, I do not know
>which other functions you are talking about here.
The "Lisp chine nual" is a work of art, a model of clarity, the epitome
of effective technical writing, and I can recommend it to anybody. ;-)
The table on page 85 contrasts the various mapping functions according to
how they select the bits of the list to work on, and what they return as
a result. It looks like this:
applies function to
| successive | successive |
| sublists | elements |
---------------+--------------+---------------+
its own | | |
second | map(l) | mapc |
argument | | |
---------------+--------------+---------------+
list of the | | |
returns function | maplist | mapcar |
results | | |
---------------+--------------+---------------+
nconc of the | | |
function | mapcon | mapcan |
results | | |
---------------+--------------+---------------+
Of these six functions, only mapc and mapcar exist in vanilla Emacs 22.
For the rest, you need to load cl-extra first. This seems a shame.
--
Alan Mackenzie (Munich, Germany)
- Release of CC Mode 5.31, Alan Mackenzie, 2005/12/02
- Re: Release of CC Mode 5.31, Eli Zaretskii, 2005/12/04
- Re: Release of CC Mode 5.31, Romain Francoise, 2005/12/04
- Re: Release of CC Mode 5.31, Alan Mackenzie, 2005/12/06
- Re: Release of CC Mode 5.31, Eli Zaretskii, 2005/12/06
- Re: Release of CC Mode 5.31, Richard M. Stallman, 2005/12/07
- Re: Release of CC Mode 5.31, Alan Mackenzie, 2005/12/07
- Re: Release of CC Mode 5.31, Richard M. Stallman, 2005/12/07
- Re: Release of CC Mode 5.31, Eli Zaretskii, 2005/12/07
- Re: Release of CC Mode 5.31, Stefan Monnier, 2005/12/07