From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: locate-file in Emacs Date: 19 Apr 2002 00:31:38 +0900 Sender: emacs-devel-admin@gnu.org Message-ID: <87k7r558h1.fsf@tc-1-100.kawasaki.gol.ne.jp> References: <200204170928.g3H9SVb27019@rum.cs.yale.edu> <200204171001.g3HA1hh27230@rum.cs.yale.edu> <200204181408.g3IE83b02114@rum.cs.yale.edu> Reply-To: Miles Bader NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1019143994 32463 127.0.0.1 (18 Apr 2002 15:33:14 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 18 Apr 2002 15:33:14 +0000 (UTC) Cc: "Stefan Monnier" , emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16yDuL-0008RU-00 for ; Thu, 18 Apr 2002 17:33:13 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16yEDa-00043m-00 for ; Thu, 18 Apr 2002 17:53:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16yDuJ-00083o-00; Thu, 18 Apr 2002 11:33:11 -0400 Original-Received: from smtp02.fields.gol.com ([203.216.5.132]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 16yDsv-0006xl-00; Thu, 18 Apr 2002 11:31:45 -0400 Original-Received: from tc-2-228.kawasaki.gol.ne.jp ([203.216.25.228] helo=tc-1-100.kawasaki.gol.ne.jp) by smtp02.fields.gol.com with esmtp (Magnetic Fields) id 16yDss-0000Jx-00; Fri, 19 Apr 2002 00:31:42 +0900 Original-Received: by tc-1-100.kawasaki.gol.ne.jp (Postfix, from userid 1000) id 06A1B3075; Fri, 19 Apr 2002 00:31:38 +0900 (JST) Original-To: Hrvoje Niksic System-Type: i686-pc-linux-gnu In-Reply-To: Original-Lines: 35 X-Abuse-Complaints: abuse@gol.com Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2735 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2735 Hrvoje Niksic writes: > > you should be able to keep backward compatibility just fine. > > The qusetion is whether or not you find the `predicate' interface > > preferable. > > I find this "mixing" of interfaces far from elegant, but I'll agree > that it's flexible. If that's your price of keeping a unified > interface, I'll accept. But I'd prefer to just keep MODE. I think that probably the best thing to do is to simply deprecate the MODE interface in documentation and recommend using a predicate in both emacs and xemacs. So think of it as an interface _change_, but with backward compatibility (similar to the previous interface change you apparently made). My reasoning: * Clearly a predicate is more powerful, and could completely replace the MODE interface if it weren't for backward compatibility concerns. * According to Stefan's earlier post, he couldn't find any code that actually used any value for MODE except `executable', so the potential programmer-convenience benefit of the MODE interface doesn't appear to be much of an issue [e.g. being able to say '(writable executable) instead of (lambda (f) (or (file-writable-p f) (file-executable-p f))) ] * Using a predicate is more elegant, and more `lispy'. I understand that it's annoying to make yet another interface to the same function, but this one is pretty innocuous. -Miles -- Quidquid latine dictum sit, altum viditur.