[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: ELIOT@cs.umass.edu
- Subject: &Rest Lists
- From: email@example.com (firstname.lastname@example.org after 1-April-88)
- Date: Tue, 15 Mar 88 10:09 est
- Cc: common-lisp@SAIL.STANFORD.EDU
- Comments: NOTE %acorn@oak... CHANGES TO @GOLD-HILL.COM ON 1-April-88
(defun foo (&rest x) ...)
Should behave as if it were defined:
(defun foo (&rest G0047) ;Gensym really
(let ((x (copy-list G0047)))
I think this fully and precisely specifies the semantics of &Rest.
I couldn't disagree more. This implementation prohibits the
programmer from exploiting sharing of list substructure. It really
takes away some expressive power. One can get back the behavior
that you want with the transform you've outlined here.
Common lisp is not a functional language, it has tons of destructive
operations. It is out of character for such a language to prohibit
sharing of substructure by copying data structures implicitly.
In general, when destructive operations are being used it should be the
programmer's responsibility to copy a data structure manually.
&REST should never cause copying of a list passed to it from APPLY.