GNU bug report logs -
#16963
A patch to create a list-with-tail primitive.
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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. :-)
[signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 6 years and 25 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.