[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Proposal #13: Structure Sharing in Arguments
Date: Sat, 26 Jul 86 13:55 EDT
From: Daniel L. Weinreb <DLW@QUABBIN.SCRC.Symbolics.COM>
Date: 23 Jul 86 13:03:26 PDT (Wed)
in any reasonable implementation the &REST argument will
have been freshly consed.
That's an extremely odd idea. The entire reason that we have &REST
arguments at all is to avoid the need for consing the list. Had we
intended for the list to be freshly consed, we would never have
implemented &REST at all; we'd have just let the caller cons up a list
and pass it as a regular argument.
Well, Dan, maybe it would be more accurate to say that the entire reason
for having &REST arguments is that we want to have N-ary functions such
as + but find the old MacLISP LEXPR ("NARGS") mechanism unappealing.
The entire reason, in turn to want &REST argument list-structure to have
dynamic extent is to avoid consing.
In the past I argued that a sufficiently clever compiler (SCC) could do
some data flow analysis and recognize when &REST arguments were being
used only in certain "safe" ways (such as being fed to a DOLIST) and
avoid consing in that case. I now lean more toward also having
something like the NARGS mechanism, yukky as it was.