Subject: Re: seperation of function namespace
From: rpw3@rpw3.org (Rob Warnock)
Date: Wed, 17 May 2006 20:19:21 -0500
Newsgroups: comp.lang.lisp
Message-ID: <V_idnQAVy_cEVvbZnZ2dnUVZ_vudnZ2d@speakeasy.net>
Kaz Kylheku <kkylheku@gmail.com> wrote:
+---------------
| Ron Garret wrote:
| > (#'(setf car) x 1)
| 
| That would be wrong even if there was a (SETF CAR) function, since
| (FUNCTION ...) isn't a function name. No evaluation takes place in the
| leftmost position, so the FUNCTION operator cannot do its job.
+---------------

And (FUNCALL #'(SETF CAR) X 1) would be wrong, since the order of
args is incorrect for the (SETF CAR) function:

    > (funcall #'(setf car) x 1)

    Type-error in KERNEL::OBJECT-NOT-LIST-ERROR-HANDLER: 1 is not of type LIST
    ...
    > 

But with the right arg order, it should work:

    > x

    (12 . 34)
    > (funcall #'(setf car) 1 x)

    1
    > x

    (1 . 34)
    > 


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607