emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: locate-file in Emacs


From: Miles Bader
Subject: Re: locate-file in Emacs
Date: 19 Apr 2002 00:31:38 +0900

Hrvoje Niksic <address@hidden> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]