From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Johan_Bockg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: CL package serious deficiencies Date: Fri, 10 Feb 2012 19:47:24 +0100 Message-ID: <87fweiikzn.fsf@gnu.org> References: <33271707.post@talk.nabble.com> <87fwemcwlx.fsf@spindle.srvr.nix> <87d39pgdu4.fsf@gnus.org> <8739aiogmw.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1328899664 29612 80.91.229.3 (10 Feb 2012 18:47:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Feb 2012 18:47:44 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 10 19:47:43 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RvvVV-0000iI-50 for ged-emacs-devel@m.gmane.org; Fri, 10 Feb 2012 19:47:41 +0100 Original-Received: from localhost ([::1]:57623 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvvVU-0005iI-Ob for ged-emacs-devel@m.gmane.org; Fri, 10 Feb 2012 13:47:40 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:51673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvvVL-0005hk-Ta for emacs-devel@gnu.org; Fri, 10 Feb 2012 13:47:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvvVH-00060p-NF for emacs-devel@gnu.org; Fri, 10 Feb 2012 13:47:31 -0500 Original-Received: from smtprelay-b11.telenor.se ([62.127.194.20]:44338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvvVH-00060k-EQ for emacs-devel@gnu.org; Fri, 10 Feb 2012 13:47:27 -0500 Original-Received: from ipb5.telenor.se (ipb5.telenor.se [195.54.127.168]) by smtprelay-b11.telenor.se (Postfix) with ESMTP id 194CADE36 for ; Fri, 10 Feb 2012 19:47:25 +0100 (CET) X-SMTPAUTH-B2: [bocjoh] X-SENDER-IP: [85.228.192.207] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Am+OANFlNU9V5MDPPGdsb2JhbABEhQ+ER6UHfhkBAQEBNzSBcgEBBAEjBC8zCQIaAgUhAgIPAQQYAQwKLYd8A6cVkXiBL4d3glgFAgQHAh0BAwgBFAYECIQ/IIIHgRYEqBU X-IronPort-AV: E=Sophos;i="4.73,397,1325458800"; d="scan'208";a="43034972" Original-Received: from c-cfc0e455.04-211-6c6b701.cust.bredbandsbolaget.se (HELO muon.localdomain) ([85.228.192.207]) by ipb5.telenor.se with ESMTP; 10 Feb 2012 19:47:25 +0100 Original-Received: by muon.localdomain (Postfix, from userid 1000) id A5821484277; Fri, 10 Feb 2012 19:47:24 +0100 (CET) Mail-Copies-To: never In-Reply-To: (Stefan Monnier's message of "Fri, 10 Feb 2012 13:24:00 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 62.127.194.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:148454 Archived-At: Stefan Monnier writes: >> I think the `-if' and `-if-not' help with reading comprehension, because >> you're signalling in the function name what you mean to do, and you >> don't have to read the predicate as thoroughly. And the predicate can >> be written clearer, too. If you don't have both forms, the predicate >> often tends to look like `(lambda (foo) (not ...))', which makes my >> brain hurt. > > That's just a question of habit, really. > > [ You might prefer "delete-if (=C2=AC =E2=88=98 pred) list", of course. ] AKA `complement' in Common Lisp: --8<---------------cut here---------------start------------->8--- (complement x) =3D=3D #'(lambda (&rest arguments) (not (apply x argum= ents))) In Common Lisp, functions with names like "xxx-if-not" are related to functions with names like "xxx-if" in that (xxx-if-not f . arguments) =3D=3D (xxx-if (complement f) . arguments) For example, (find-if-not #'zerop '(0 0 3)) =3D=3D (find-if (complement #'zerop) '(0 0 3)) =3D> 3 --8<---------------cut here---------------end--------------->8---