Hi
I noticed that there is no portable way to access the evaluated
arguments passed to an undefined function.
IMHO this is a problem in CLHS. The function
CONDITIONS:UNDEFINED-FUNCTION-ARGUMENTS (returning a list of evaluated
arguments) is available in one form or another in most CL implementations.
What was the rationale for not including it in the CLHS?
Cheers
--
Marco Antoniotti
From: Tim Bradshaw
Subject: Re: Missing accessors in CL:UNDEFINED-FUNCTION condition.
Date:
Message-ID: <ey3fzp5g63p.fsf@cley.com>
* Marco Antoniotti wrote:
> IMHO this is a problem in CLHS. The function
> CONDITIONS:UNDEFINED-FUNCTION-ARGUMENTS (returning a list of evaluated
> arguments) is available in one form or another in most CL
> implementations.
Well, one thing is that, say (SYMBOL-FUNCTION 'foo) signals this error
(or a subclass...), and there is no sensible notion of arguments
there. Another, I think is that even in a call the implementation may
not *know* what the arguments were, either because it has optimized
them away or because they haven't yet been computed - I don't think
there's any prohibition against an implementation which detects an
undefined function before the arguments have been computed. Finally,
perhaps the arguments are only of dynamic extent...
So I think to do this `right' you'd need a much more elaborate
protocol than just `get me the arguments': at least `are there
arguments?' `are they available?'.
--tim
Tim Bradshaw wrote:
> * Marco Antoniotti wrote:
>
>
> >IMHO this is a problem in CLHS. The function
> >CONDITIONS:UNDEFINED-FUNCTION-ARGUMENTS (returning a list of evaluated
> >arguments) is available in one form or another in most CL
> >implementations.
>
>
> Well, one thing is that, say (SYMBOL-FUNCTION 'foo) signals this error
> (or a subclass...), and there is no sensible notion of arguments
> there. Another, I think is that even in a call the implementation may
> not *know* what the arguments were, either because it has optimized
> them away or because they haven't yet been computed - I don't think
> there's any prohibition against an implementation which detects an
> undefined function before the arguments have been computed. Finally,
> perhaps the arguments are only of dynamic extent...
>
> So I think to do this `right' you'd need a much more elaborate
> protocol than just `get me the arguments': at least `are there
> arguments?' `are they available?'.
Fair enough. A function that returned two values <argument list> and
<validp> would be good enough.
Cheers
--
Marco Antoniotti
From: Kalle Olavi Niemitalo
Subject: Re: Missing accessors in CL:UNDEFINED-FUNCTION condition.
Date:
Message-ID: <87znndvnub.fsf@Astalo.kon.iki.fi>
Marco Antoniotti <·······@cs.nyu.edu> writes:
> I noticed that there is no portable way to access the evaluated
> arguments passed to an undefined function.
This condition can also be signaled from FDEFINITION, which does
not have an argument list for calling the undefined function.