From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: CL package serious deficiencies Date: Sun, 12 Feb 2012 19:58:58 +0100 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 1329073164 3743 80.91.229.3 (12 Feb 2012 18:59:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 12 Feb 2012 18:59:24 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 12 19:59:24 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 1Rwedq-00070j-Js for ged-emacs-devel@m.gmane.org; Sun, 12 Feb 2012 19:59:18 +0100 Original-Received: from localhost ([::1]:60730 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rwedq-0007jl-8u for ged-emacs-devel@m.gmane.org; Sun, 12 Feb 2012 13:59:18 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:34977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rwedn-0007jg-U4 for emacs-devel@gnu.org; Sun, 12 Feb 2012 13:59:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rwedm-0006uw-RY for emacs-devel@gnu.org; Sun, 12 Feb 2012 13:59:15 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:36447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rwedm-0006uq-MU for emacs-devel@gnu.org; Sun, 12 Feb 2012 13:59:14 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Rwedl-0006wQ-Tk for emacs-devel@gnu.org; Sun, 12 Feb 2012 19:59:13 +0100 Original-Received: from dial-183239.pool.broadband44.net ([212.46.183.239]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 12 Feb 2012 19:59:13 +0100 Original-Received: from eller.helmut by dial-183239.pool.broadband44.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 12 Feb 2012 19:59:13 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: dial-183239.pool.broadband44.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux) Cancel-Lock: sha1:fi0M1yFsdGdWMyeJRy41ex0oWdA= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:148521 Archived-At: * Stefan Monnier [2012-02-12 18:15] writes: >>>>> 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)))). >>>> This transformation can be done automatically by a compiler-macro. >>> Not sure what you mean by "automatically", here. Do you mean "without >>> prompting the user to do the transformation by hand"? >> Yes. > > That's the expected behavior of a compiler-macro, so really what you're > saying is that "This transformation can be done by a compiler-macro", > but the problem remains: you have to write the compiler-macro by hand, > and the function still has to handle the :key argument anyway, in case > the compiler-macro can't do its job. Yes, compiler-macros have to written and the cases that aren't handled by compiler-macros could then only be used when 'cl is loaded (that code is already there). Many uses of :key and :test can be handled by such compiler-macros. If things need to be fast, some parts must be written in C. Using compiler-macros would be a relatively easy way to provide efficient implementations for the most important uses of cl-sequence functions. That's all. If you like to spend your time designing similar but incompatible functions just go ahead. Helmut