[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CL package serious deficiencies
From: |
Stefan Monnier |
Subject: |
Re: CL package serious deficiencies |
Date: |
Fri, 10 Feb 2012 13:51:14 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
> 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
- Re: CL package serious deficiencies, (continued)
- Re: CL package serious deficiencies, Stefan Monnier, 2012/02/10
- Re: CL package serious deficiencies, Juanma Barranquero, 2012/02/10
- RE: CL package serious deficiencies, Drew Adams, 2012/02/10
- Re: CL package serious deficiencies, Stefan Monnier, 2012/02/10
- RE: CL package serious deficiencies, Drew Adams, 2012/02/10
- Re: CL package serious deficiencies, Lars Ingebrigtsen, 2012/02/10
- Re: CL package serious deficiencies, Stefan Monnier, 2012/02/10
- Re: CL package serious deficiencies, Lars Ingebrigtsen, 2012/02/10
- Re: CL package serious deficiencies, Johan Bockgård, 2012/02/10
- Re: CL package serious deficiencies, Helmut Eller, 2012/02/10
- Re: CL package serious deficiencies,
Stefan Monnier <=
- Re: CL package serious deficiencies, Lars Ingebrigtsen, 2012/02/10
- Re: CL package serious deficiencies, Helmut Eller, 2012/02/10
- Re: CL package serious deficiencies, Stefan Monnier, 2012/02/12
- Re: CL package serious deficiencies, Helmut Eller, 2012/02/12
- Re: CL package serious deficiencies, Stefan Monnier, 2012/02/12
- Re: CL package serious deficiencies, Helmut Eller, 2012/02/12
- Re: CL package serious deficiencies, Teemu Likonen, 2012/02/11
- Re: CL package serious deficiencies, Juanma Barranquero, 2012/02/11
- Re: CL package serious deficiencies, Johan Bockgård, 2012/02/11
- Re: CL package serious deficiencies, Juanma Barranquero, 2012/02/11