From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: RE: delete-windows-on Date: Sat, 03 Oct 2009 03:27:26 +0900 Message-ID: <87hbuhirch.fsf@uwakimon.sk.tsukuba.ac.jp> References: <8EA9172832C04915909AE7B506260481@us.oracle.com> <1EC435DE2A694911BE4AB26857D8C2C3@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1254507510 19185 80.91.229.12 (2 Oct 2009 18:18:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Oct 2009 18:18:30 +0000 (UTC) Cc: 'Juanma Barranquero' , emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 02 20:18:23 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mtmhy-0005iw-F2 for ged-emacs-devel@m.gmane.org; Fri, 02 Oct 2009 20:18:22 +0200 Original-Received: from localhost ([127.0.0.1]:58029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mtmhx-0003gK-Sq for ged-emacs-devel@m.gmane.org; Fri, 02 Oct 2009 14:18:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mtmhs-0003fE-FZ for emacs-devel@gnu.org; Fri, 02 Oct 2009 14:18:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mtmhn-0003Wm-BE for emacs-devel@gnu.org; Fri, 02 Oct 2009 14:18:15 -0400 Original-Received: from [199.232.76.173] (port=42135 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mtmhn-0003Wf-6x for emacs-devel@gnu.org; Fri, 02 Oct 2009 14:18:11 -0400 Original-Received: from mtps01.sk.tsukuba.ac.jp ([130.158.97.223]:53870) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mtmhm-0006pZ-ON for emacs-devel@gnu.org; Fri, 02 Oct 2009 14:18:11 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mtps01.sk.tsukuba.ac.jp (Postfix) with ESMTP id 86FF91535AF; Sat, 3 Oct 2009 03:18:04 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 245CC12811B; Sat, 3 Oct 2009 03:27:26 +0900 (JST) In-Reply-To: <1EC435DE2A694911BE4AB26857D8C2C3@us.oracle.com> X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta29) "garbanzo" 02b7c7189041+ XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115863 Archived-At: Drew Adams writes: > Why should it be an error? We have ways to check whether an object > is a buffer - code can always do that. No. Code *must* *check*. So although signaling the result of the check is in principal optional, there's no cost to signal an error if the check fails. > Why do that here also (in effect)? Errors should never pass silently. Unless explicitly silenced. Among other things, deleting windows on a buffer is a relatively safe time to signal an error; you're not likely to be screwing anything up by doing that, the user deals with an annoying beep and it's over. > To me, it makes sense to treat 42 here the same way we treated nil > in Emacs 21-22: a no-op. I'd sooner see both (a) a no-op here and > (b) a return value that indicates what happened. Status values suck. Programmers do not check them; that is one of the few things you can truly rely on in software engineering. Checking them explicitly is indeed a PITA, and inefficient in Emacs Lisp (requires a function call). As for no-ops, I don't understand why you want GINO (garbage in, no output). > It seems that that is the case here: nil is always returned. I have > no problem with our documenting that. But it might be even better > to return some useful info. Status values are not useful. Neither are the deleted windows, I guess (don't know about the Emacs implementation, but in XEmacs deleted windows are quarantined because their attributes are not reliable -- they don't get updated at all). What useful info do you suggest (I'd like tomorrow's price of Oracle stock, preferably before noon today, now *that* would be useful :-)?