Re: pwgl-users: eval funcall
Hi Fred,
On Jun 6, 2009, at 2:00 PM, fredvoisin wrote:
> hello,
>
> attached pwgl file illustrate a trivial question on funcall and eval
> behavior in pwgl that differ with CL and seems not logical to me,
> trying to understand since I use quite a lot of lambdas and s-
> expression in pwgl :
There is indeed a difference between pwgl and cl in the evaluation
scheme for the inputs:
In pwgl (and also in patchwork) you don't quote list inputs, for
instance:
(1 2 3 4)
while in cl you must add a quote:
'(1 2 3 4)
This was done so the user does not have to quote list inputs (which is
a very common
case almost in any pwgl patch).
If you need the extra evaluation, use the 'eval-box' ('eval-box'
should also be used
with your the lambda expression example).
>
>
> - why functions defined in lisp-code-boxes (implicitely in cl-user
> space) are not recognised into pwgl in some cases (when funcalled) ?
Currently you should always use the 'in-package' statement in a Lisp-
code box or a text-box.
But I think you are right, we should fix this so that by default the
system should use cl-user,
if the 'in-package' statement is left out.
Mikael
>
> - why funcalling a lambda s-expression may be eval (in CL it does
> not need it) ?
>
> thank's for help !
>
> Cheers,
> Frederic Voisin
>