From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: no empty (zero) string predicate in Elisp Date: Sun, 26 Apr 2015 20:39:09 +0200 Organization: Aioe.org NNTP Server Message-ID: <87618i20qa.fsf@debian.uxu> References: <87h9s4rhx5.fsf@debian.uxu> <87wq0zkqxa.fsf@debian.uxu> <093d7e9f-5049-4bf0-8ebb-3c1cb1b3db2d@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1430073345 7327 80.91.229.3 (26 Apr 2015 18:35:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Apr 2015 18:35:45 +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 20:35:45 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 1YmROf-0007Pj-Uc for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Apr 2015 20:35:18 +0200 Original-Received: from localhost ([::1]:51756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmROf-0004mm-9C for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Apr 2015 14:35:17 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!1.eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 82 Original-NNTP-Posting-Host: feB02bRejf23rfBm51Mt7Q.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:snejH/LBCst/Ts1Bt8qv5wFYbA4= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:211727 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:104009 Archived-At: Rusi writes: > Rather befuddled here... Do you want or not want > empty-string-p?? Of course I want it! That's why I wrote it myself and then suggested it be included. > 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). No, I meant *unary* - I just wrote: "Pascal J. Bourguignon" writes: > The only problem with that, is that a binary > operator has 2 arguments: > > (binop a b) > > therefore if you want a binary operator, you > want: > > (string= s "") > > On the other hand, if you want only one > argument, then you want a unary operator: > > (unary a) Indeed! You have to read what I think, not what I write... OK, let's try again: I want a *unary* function because this involves a *single* argument (sounds logical, right?) - the function's value only depends on a property of this single argument. In math notation: / true x = "" f(x) = \ false else The implementation one the other hand may contain everything else that is needed, including the "" for comparison (in this case and in that implementation). While the *implementation* can be optimized for speed, the *function* and its interface should be formulated for clarity and "building blockness" as to facilitate ease of combination with other functions... This is the building block, toolchain, bottom-up approach which is the opposite of the fancy game of "programming" by drawing super-ambitious UML and class diagrams - "if you don't do it, it won't work ultimately", which is wrong - that approach very often fails, and when it does, instead of simply replacing the failing link, the whole thing must be done again, maybe with some slightly modified approach, "new ideas", etc. > and when this unary operator returns a boolean, > you call it a predicate > > (emptyp s) Cool. "Predicate" is a word from the grammars of human languages, but I don't know its exact meaning, neither there or in programming languages (until now as for programming). -- underground experts united http://user.it.uu.se/~embe8573