From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: CL package serious deficiencies Date: Fri, 10 Feb 2012 13:51:14 -0500 Message-ID: References: <33271707.post@talk.nabble.com> <87fwemcwlx.fsf@spindle.srvr.nix> <87d39pgdu4.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1328899889 31386 80.91.229.3 (10 Feb 2012 18:51:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Feb 2012 18:51:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 10 19:51:28 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 1RvvZ9-0002s1-MA for ged-emacs-devel@m.gmane.org; Fri, 10 Feb 2012 19:51:27 +0100 Original-Received: from localhost ([::1]:54434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvvZ9-0006V7-5L for ged-emacs-devel@m.gmane.org; Fri, 10 Feb 2012 13:51:27 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:60335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvvYz-0006QK-RP for emacs-devel@gnu.org; Fri, 10 Feb 2012 13:51:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvvYy-0007iI-MM for emacs-devel@gnu.org; Fri, 10 Feb 2012 13:51:17 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:11985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvvYy-0007hs-G8 for emacs-devel@gnu.org; Fri, 10 Feb 2012 13:51:16 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwIAItmNU9MCqD0/2dsb2JhbABErl1+gQiBcgEBBAFWIwULCzQSFBgNJIgPuQyJJoIMNwVHDAcIBgQIg2QFhBMEiEmbD4Ra X-IronPort-AV: E=Sophos;i="4.73,397,1325480400"; d="scan'208";a="162520816" Original-Received: from 76-10-160-244.dsl.teksavvy.com (HELO pastel.home) ([76.10.160.244]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 10 Feb 2012 13:51:15 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id D1D6958F68; Fri, 10 Feb 2012 13:51:14 -0500 (EST) In-Reply-To: (Helmut Eller's message of "Fri, 10 Feb 2012 18:12:23 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:148455 Archived-At: > At the risk of stating the obvious: we could define compiler-macros for > keyword-using functions like position and automatically rewrite all uses > to a keyword-less implementation like cl-position. Then everybody could > use the prefix-less version without the need to (require 'cl) at > runtime. The problem with this approach is that you end up having to first implement the function (complex because of all the args you have to handle), then re-implement it all as a compiler-macro (which happens to be more complex and bug-prone and more difficult to debug, usually). In the end, a lot of complexity, lots of bugs, difficult to maintain, and the function itself is dog-slow because it has to handle all the weird combinations. Even a pure macro makes more sense at that point. I much prefer a leaner approach where instead of (delete-if #'foo :key #'bar) you have to write (delete-if (lambda (x) (foo (bar x)))). As for :start :end :from-end and :count, I've never even seen them used with delete-if. The :key in `sort*' makes sense. Not in `delete-if'. Stefan