From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rusi Newsgroups: gmane.emacs.help Subject: Re: no empty (zero) string predicate in Elisp Date: Sun, 26 Apr 2015 10:28:14 -0700 (PDT) Message-ID: <093d7e9f-5049-4bf0-8ebb-3c1cb1b3db2d@googlegroups.com> References: <87h9s4rhx5.fsf@debian.uxu> <87wq0zkqxa.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1430069428 13315 80.91.229.3 (26 Apr 2015 17:30:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Apr 2015 17:30:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 26 19:30:28 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YmQNn-0006WD-VC for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Apr 2015 19:30:20 +0200 Original-Received: from localhost ([::1]:51598 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmQNn-0000BS-DB for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Apr 2015 13:30:19 -0400 X-Received: by 10.42.149.6 with SMTP id t6mr14885502icv.25.1430069294639; Sun, 26 Apr 2015 10:28:14 -0700 (PDT) X-Received: by 10.50.142.9 with SMTP id rs9mr148868igb.6.1430069294626; Sun, 26 Apr 2015 10:28:14 -0700 (PDT) Original-Path: usenet.stanford.edu!m20no6440760iga.0!news-out.google.com!n7ni17755igk.0!nntp.google.com!l13no10394889iga.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: <87wq0zkqxa.fsf@debian.uxu> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=117.195.35.158; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 117.195.35.158 User-Agent: G2/1.0 Injection-Date: Sun, 26 Apr 2015 17:28:14 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:211725 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104007 Archived-At: On Sunday, April 26, 2015 at 6:01:15 PM UTC+5:30, Emanuel Berg wrote: > Stefan Monnier writes: > > > I do wonder, why you'd rather write (empty-string-p > > foo) instead of (equal "" foo) or (string= "" foo) > > ... It's longer > > I don't mind typing. It is one of my favorite > activities (in very stiff competition), especially > when it only involves common words with chars that are > close and super-fast to type: 'empty-string-p' is > definitely more pleasant to type (and read) than > 'string= ""' whereas 'equal ""' should be about > "equally" pleasant to type, but still less so to read. > > > slower > > If that is true, which I suppose it is because it > requires an extra function call, the difference should > be close to infinitely small. I don't consider such > quantities. Actually, I don't consider speed at all > when I write Elisp. (But I never did any one big > project that could gain from optimization, either. > Still, I don't think I write slow code, in general.) > > When I told the other guy the other day that > (make-string 10 ? ) is better than `dotimes' and > (insert " ") 10 times, there I focus on the code > rather than the speed - but those two (?) ways of > thinking should work to each other's advantage > most often. > > > not higher-level either > > I don't know the scientific definition of "high-level" > - or how it applies to these three Elisp functions. > > The reason I want a binary operator is that it is more > intuitive: it refects my way of thinking - "is the > string empty?" vs. "is the string equal to another > string that is empty?" - also, because a binary > operator reduces the number of data items in the code > (with one, the empty string). > > In general, I don't want the same function to be > spelled out over and over to do the same thing - > instead, I want it factored out, named, and invoked > with a "minimal", that is, sufficient, interface. > > -- > underground experts united > http://user.it.uu.se/~embe8573 Rather befuddled here... Do you want or not want empty-string-p?? Your first post said you've defined it and you want it not in ELPA but emacs. Now you are saying you want a binary -- presumably (== "" whatever).