Subject: bug#16963: A patch to create a list-with-tail primitive.

From: Demetrios Obenour <[email-masked]>
Date: Fri, 28 Mar 2014 21:46:58 -0400

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?