On 4 July 2011 19:42, Pascal J. Bourguignon wrote:
> I don't think so.
I disagree strongly, and I'm pretty sure CLHS agrees with me, since it
goes to the trouble of specifying what happens with FUNCALL.
CLHS, DEFINE-COMPILER-MACRO: "The &whole argument is bound to the form
argument that is pass
On 4 July 2011 16:11, Alessio Stalla wrote:
> On Mon, Jul 4, 2011 at 3:09 PM, Pascal J. Bourguignon
> wrote:
>> Nikodemus Siivola
>> writes:
>>
>>> On 4 July 2011 14:46, Stas Boukarev wrote:
* They can't be used with APPLY or FUNCALL.
>>>
>>> Actually, they can be used with FUNCALL.
>>>
>
And if you ever wondered why CLOS makes you spell
out the names of readers and accessors, this is why.
CLOS does not want to make any assumptions about
how you want to make decisions about what
packages things are in.
It's the "right thing" rather than the "worse is better"
way, with all the usual
Nikodemus Siivola writes:
> On 4 July 2011 14:46, Stas Boukarev wrote:
>
>> * They can't be used with APPLY or FUNCALL.
>
> Actually, they can be used with FUNCALL.
I meant that it can be use with FUNCALL when it's called not on a known
function.
--
With best regards, Stas.
_
On Mon, Jul 4, 2011 at 5:57 AM, Tamas Papp wrote:
> I understand this. My main question is: why not do this with compiler
> macros? Is there any reason for this, other than historical?
3.2.2.1.3 might offer some insight: "However, no language processor
(compiler, evaluator, or other code walker
On Mon, Jul 4, 2011 at 3:09 PM, Pascal J. Bourguignon
wrote:
> Nikodemus Siivola
> writes:
>
>> On 4 July 2011 14:46, Stas Boukarev wrote:
>>
>>> * They can't be used with APPLY or FUNCALL.
>>
>> Actually, they can be used with FUNCALL.
>>
>> (Otherwise, I echo pretty much everything that Stas s
Nikodemus Siivola
writes:
> On 4 July 2011 14:46, Stas Boukarev wrote:
>
>> * They can't be used with APPLY or FUNCALL.
>
> Actually, they can be used with FUNCALL.
>
> (Otherwise, I echo pretty much everything that Stas said.)
>
> Compiler-macros are, however, of decent tool for optimizing comm
On 4 July 2011 14:46, Stas Boukarev wrote:
> * They can't be used with APPLY or FUNCALL.
Actually, they can be used with FUNCALL.
(Otherwise, I echo pretty much everything that Stas said.)
Compiler-macros are, however, of decent tool for optimizing common
cases of :KEY and :TEST arguments.
Ch
Tamas Papp writes:
> I would appreciate advice on this. I am especially interested in the
> reason why some CL functions have :key arguments: is it because of
> efficiency, backward-compatibility/history, or something else?
The rationals for Common Lisp are generally explained in the first
ch
Tamas Papp writes:
> On Mon, 04 Jul 2011 14:20:32 +0400, Stas Boukarev wrote:
>
>> Tamas Papp writes:
>>
>>> On Mon, 04 Jul 2011 11:39:39 +0200, Hans Hübner wrote:
>>>
On Mon, Jul 4, 2011 at 11:31 AM, Tamas Papp wrote:
> Why do some CL library functions have :key arguments?
[...]
On Mon, 04 Jul 2011 14:20:32 +0400, Stas Boukarev wrote:
> Tamas Papp writes:
>
>> On Mon, 04 Jul 2011 11:39:39 +0200, Hans Hübner wrote:
>>
>>> On Mon, Jul 4, 2011 at 11:31 AM, Tamas Papp wrote:
Why do some CL library functions have :key arguments?
>>> [...]
but it is a bit cumbersom
On Mon, 04 Jul 2011 12:12:33 +0200, Svante Carl v. Erichsen wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Am 04.07.2011 11:31, schrieb Tamas Papp:
>> Why do some CL library functions have :key arguments?
>>
>> I am asking because I am working on some statistics functions, and the
Tamas Papp writes:
> On Mon, 04 Jul 2011 11:39:39 +0200, Hans Hübner wrote:
>
>> On Mon, Jul 4, 2011 at 11:31 AM, Tamas Papp
>> wrote:
>>> Why do some CL library functions have :key arguments?
>> [...]
>>> but it is a bit cumbersome. I can make my code simpler by relying on
>>> calls like
>>>
>
On Mon, 04 Jul 2011 11:39:39 +0200, Hans Hübner wrote:
> On Mon, Jul 4, 2011 at 11:31 AM, Tamas Papp
> wrote:
>> Why do some CL library functions have :key arguments?
> [...]
>> but it is a bit cumbersome. I can make my code simpler by relying on
>> calls like
>>
>> (quantiles (map 'vector key v
On Mon, Jul 4, 2011 at 11:31 AM, Tamas Papp wrote:
> Why do some CL library functions have :key arguments?
[...]
> but it is a bit cumbersome. I can make my code simpler by relying on
> calls like
>
> (quantiles (map 'vector key vector) quantiles)
This not only conses "a bit more", it also dupli
Why do some CL library functions have :key arguments?
I am asking because I am working on some statistics functions, and the
design choice came up. Specifically, I can write functions like
(defun quantiles (sequence quantiles &key (key #'identity))
...)
but it is a bit cumbersome. I can ma
16 matches
Mail list logo