Closed Zulu-Inuoe closed 1 year ago
I asked on #sbcl
whether there is a way to tell whether the value returned by sb-introspect:function-lambda-list
is NIL
because the information was not saved from the situation where the lambda list is an empty list.
I don't believe SBCL gives us any way to distinguish the two.
Submitted upstream to https://bugs.launchpad.net/sbcl/+bug/1901781
You may want to add your thoughts to https://groups.google.com/g/sbcl-devel/c/bCqU3TYyqxo/m/0YWwfkyoBQAJ which has attracted some criticism. I think I'll make sb-introspect return NIL for :UNKNOWN, but suggest to you that sb-kernel:%fun-lambda-list be used to detect the actual unknown case. The issue was internally we could not detect unknown, and now we can.
@snuglas you may want to hold on that, as that change has been reverted partially and is still pending impl details.
Regardless you likely want to wait until the new SBCL version is officially out
I made it return two values, as using the internal sb-kernel:%fun-lambda-list is not a great idea.
Oh oops. I misread what you suggested. I thought you'd be updating trivial-arguments
to return nil rather than :unknown
. Disregard
On SBCL 2.0.9:
returns
nil
, whereas uppingdebug
:gives me the expected result of
(x y z)
I would instead expect
:unknown
, in order to detect that the lambda list couldn't be determined