From: Daniel Colascione <dancol@dancol.org>
To: Demetrios Obenour <demetriobenour@gmail.com>
Cc: 16963@debbugs.gnu.org
Subject: bug#16963: A patch to create a list-with-tail primitive.
Date: Fri, 28 Mar 2014 18:48:09 -0700 [thread overview]
Message-ID: <53362659.8030106@dancol.org> (raw)
In-Reply-To: <1396057618.8469.0.camel@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 1544 bytes --]
On 03/28/2014 06:46 PM, Demetrios Obenour wrote:
> On Thu, 2014-03-27 at 16:38 -0700, Daniel Colascione wrote:
>> On 03/27/2014 04:37 PM, Demetrios Obenour wrote:
>> > On Mon, 2014-03-24 at 19:45 -0700, Daniel Colascione wrote:
>> >> On 03/24/2014 07:10 PM, Stefan wrote:
>> >>>> Since a comment in backquote.el said that backquote-list* needed to be a
>> >>>> primitive, here is an implementation of it as one, under the name
>> >>>> list-with-tail.
>> >>>
>> >>> I think it would make more sense to call it `list*'. Also it might make
>> >>> sense to change backquote.el so it uses this `list*' (tho probably only
>> >>> when passed with enough arguments).
>> >>
>> >> Agreed. On more that one occasion, I've wished we had a CL-less `list*'.
>> >> If you do add this feature, please make sure the existing list* compiler
>> >> macros keep working.
>> >>
>> > What about just deleting these compiler macros, and making cl-list* an
>> > alias for list*?
>> >
>> > There seems to be little point in keeping them if list* is a primitive.
>>
>> The new list* doesn't have an opcode, but cons does.
>>
> Good point! My testing showed four nested cons calls to be much faster
> than list* with five arguments by several dozen times.
>
> Maybe list* should be a macro instead?
No, list* as a function is perfectly fine --- we might want to call it
indirectly sometimes, e.g., with apply. The compiler macro is sufficient
to convert it to cons calls when we know it's safe. M-x disassemble is
your friend. :-)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
next prev parent reply other threads:[~2014-03-29 1:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-07 13:58 bug#16963: A patch to create a list-with-tail primitive Demetrios Obenour
2014-03-25 2:10 ` Stefan
2014-03-25 2:45 ` Daniel Colascione
2014-03-27 23:37 ` Demetrios Obenour
2014-03-27 23:38 ` Daniel Colascione
2014-03-28 0:43 ` Demetrios Obenour
2014-03-29 1:46 ` Demetrios Obenour
2014-03-29 1:48 ` Daniel Colascione [this message]
2014-03-29 13:30 ` Demetrios Obenour
2016-02-24 2:51 ` Lars Ingebrigtsen
2019-06-26 14:30 ` Lars Ingebrigtsen
2019-06-28 3:14 ` Noam Postavsky
2019-06-28 3:30 ` Drew Adams
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=53362659.8030106@dancol.org \
--to=dancol@dancol.org \
--cc=16963@debbugs.gnu.org \
--cc=demetriobenour@gmail.com \
/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.