From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: region-active-p Date: Fri, 02 Nov 2007 09:18:52 +0900 Message-ID: <87ir4lqz2r.fsf@catnip.gol.com> References: Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193962771 9927 80.91.229.12 (2 Nov 2007 00:19:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Nov 2007 00:19:31 +0000 (UTC) Cc: reinersteib+gmane@imap.cc, andreas.roehler@online.de, emacs-devel@gnu.org, juri@jurta.org, monnier@iro.umontreal.ca, stephen@xemacs.org, drew.adams@oracle.com To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 02 01:19:29 2007 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 1InkG1-0000PY-4R for ged-emacs-devel@m.gmane.org; Fri, 02 Nov 2007 01:19:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1InkFr-0003GO-2R for ged-emacs-devel@m.gmane.org; Thu, 01 Nov 2007 20:19:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1InkFn-0003Eq-DY for emacs-devel@gnu.org; Thu, 01 Nov 2007 20:19:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1InkFl-0003Cb-Hg for emacs-devel@gnu.org; Thu, 01 Nov 2007 20:19:14 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1InkFl-0003CT-Ee for emacs-devel@gnu.org; Thu, 01 Nov 2007 20:19:13 -0400 Original-Received: from smtp02.dentaku.gol.com ([203.216.5.72]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1InkFY-0006cI-SX; Thu, 01 Nov 2007 20:19:01 -0400 Original-Received: from 203-216-97-240.dsl.gol.ne.jp ([203.216.97.240] helo=catnip.gol.com) by smtp02.dentaku.gol.com with esmtpa (Dentaku) id 1InkFT-0001CL-FE; Fri, 02 Nov 2007 09:18:55 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id 78F862F4C; Fri, 2 Nov 2007 09:18:52 +0900 (JST) System-Type: i686-pc-linux-gnu In-Reply-To: (Richard Stallman's message of "Thu\, 01 Nov 2007 15\:04\:13 -0400") Original-Lines: 44 X-Abuse-Complaints: abuse@gol.com X-detected-kernel: by monty-python.gnu.org: 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:82330 Archived-At: Richard Stallman writes: > > Overrides the command's usual behavior. > > Perhaps that's how it's usually used, but to name the predicate based on > that seems sort of weird. > > It is not weird to name a function based on the job you do with it. It's not very helpful for elisp hackers, however -- to understand what's going on, they must go and read the source code to the function in question -- whereas a better name _does_ help them. If you see: (if (i-should-jump-p) (jump)) That really tells you nothing about the reasons for jumping (you need to read i-should-jump-p to find out), whereas: (if (im-really-depressed-p) (jump)) tells you why in a glance; to find out all the gory details you need to read more, but until you do that, you still have a good general idea. The former style can be desirable if the details of should-jump-p in fact are very complicated (not summarizable by a single phrase) or might change often though user-customization or whatever. Still, one has to weigh flexibility against clarity in deciding which style to use. > The other good names cause practical problems which have already been > explained. Well then why not pick _another_ good name which is still helpful to the code reader? David Kastrup suggested `region-selected-p', which seems intuitive and helpful in the same way that region-active-p is. -Miles -- The automobile has not merely taken over the street, it has dissolved the living tissue of the city. Its appetite for space is absolutely insatiable; moving and parked, it devours urban land, leaving the buildings as mere islands of habitable space in a sea of dangerous and ugly traffic. [James Marston Fitch, New York Times, 1 May 1960]