[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CL package serious deficiencies
From: |
Helmut Eller |
Subject: |
Re: CL package serious deficiencies |
Date: |
Sun, 12 Feb 2012 19:58:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux) |
* 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
- Re: CL package serious deficiencies, (continued)
- Re: CL package serious deficiencies, Helmut Eller, 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, 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 <=
- 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
- Re: CL package serious deficiencies, Stefan Monnier, 2012/02/12
- Re: CL package serious deficiencies, Teemu Likonen, 2012/02/12
- Re: CL package serious deficiencies, Stefan Monnier, 2012/02/12
- Re: CL package serious deficiencies, Stefan Monnier, 2012/02/12
- Re: CL package serious deficiencies, Dimitri Fontaine, 2012/02/19