From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.help Subject: Re: replacing a certain element in a list with another Date: Sat, 25 Oct 2003 13:25:24 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <877k2ttv8b.fsf@ID-87814.user.dfncis.de> References: <8jSlb.186$lK3.106@news.level3.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1067082489 17523 80.91.224.253 (25 Oct 2003 11:48:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 25 Oct 2003 11:48:09 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 25 13:48:07 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ADMtr-0001s0-00 for ; Sat, 25 Oct 2003 13:48:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ADMri-0007R4-9W for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Oct 2003 07:45:54 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.r-kom.de!fu-berlin.de!uni-berlin.de!dialin-145-254-191-249.arcor-ip.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Original-NNTP-Posting-Host: dialin-145-254-191-249.arcor-ip.net (145.254.191.249) Original-X-Trace: news.uni-berlin.de 1067081649 33510868 145.254.191.249 (16 [87814]) X-Attribution: os X-Face: "HgH2sgK|bfH$; PiOJI6|qUCf.ve<51_Od(%ynHr?=>znn#~#oS>",F%B8&\vus),2AsPYb -n>PgddtGEn}s7kH?7kH{P_~vu?]OvVN^qD(L)>G^gDCl(U9n{:d>'DkilN!_K"eNzjrtI4Ya6; Td% IZGMbJ{lawG+'J>QXPZD&TwWU@^~A}f^zAb[Ru;CT(UA]c& User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:LpxaxndYkx5ZMx6fcZCloSODF5U= Original-Xref: shelby.stanford.edu gnu.emacs.help:117605 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:13537 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13537 Roland Winkler writes: > Barry Margolin writes: > >> The verbose documentation of all the destructive list operations should >> mention that you must use the value to get the expected results all the >> time, rather than depending on everything to work due to the lists being >> modified in place. > > The first part of your sentence is exactly my point. Unlike the > docstring of nreverse, the info node presently does not say > explicitely that it is the _return_ value that should be used. I agree that this could be more verbose. It is not, however, undocumented as you seem to imply. I want to note---by the way---that in my esteem destructive operations ship with a big sign on them: “Dangerous! Handle with caution!” > (It is hidden only implicitely in the sentence: "To avoid confusion, > we usually store the result of `nreverse' back in the same variable > which held the original list.") I think that sentence is meant to say “... back in the same variable which held the original list rather than in *another* variable. Because that original variable may still be around and you could become heavily confused when you try to debug your program and wonder why on earth your variable has such a very weird unexpected value at some point. On the other hand that's what you get for careless use of destructive functions ...” [...] > The last two lines I find confusing because they use the argument of > nreverse after it was passed to nreverse. [...] Confusion is always bad. I think you are right, that this should be more verbose. Please send a bug report: (info "(elisp)Caveats"). Oliver -- 4 Brumaire an 212 de la Révolution Liberté, Egalité, Fraternité!