Consider these two expressions:
(disassemble '(lambda (x) x))
(disassemble #'(lambda (x) x))
The first one works with ACL, but fails with CMUCL.
The second one works with CMUCL, but fails with ACL.
The hyperspec says:
Function DISASSEMBLE
Syntax:
disassemble fn => nil
Arguments and Values:
fn---an extended function designator or a lambda expression.
I'm leaning towards thinking that CMUCL has the correct behavior. It's
annoying that there is not one syntax that works with both. What do you guys
think?
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
> Hmmm...
>
> Consider these two expressions:
>
> (disassemble '(lambda (x) x))
> (disassemble #'(lambda (x) x))
>
> The first one works with ACL, but fails with CMUCL.
> The second one works with CMUCL, but fails with ACL.
>
> The hyperspec says:
>
> Function DISASSEMBLE
>
> Syntax:
>
> disassemble fn => nil
>
> Arguments and Values:
>
> fn---an extended function designator or a lambda expression.
>
> I'm leaning towards thinking that CMUCL has the correct behavior. It's
> annoying that there is not one syntax that works with both. What do you guys
> think?
In MCL and Genera both forms do work.
that's a bug in CMUCL.
| The second one works with CMUCL, but fails with ACL.
that's a bug in Allegro CL.
| I'm leaning towards thinking that CMUCL has the correct behavior.
why? the standard explicitly says `lambda expression'.
if DISASSEMBLE should indeed accept an interpreted function as arugment,
this is a fix for DISASSEMBLE in Allegro CL:
excl:
(advise disassemble :before allow-interpreted-function nil
(when (interpreted-function-p (first arglist))
(setf (first arglist)
(func_code (first arglist)))))
#:Erik
> Hmmm...
>
> Consider these two expressions:
>
> (disassemble '(lambda (x) x))
> (disassemble #'(lambda (x) x))
>
> The first one works with ACL, but fails with CMUCL.
> The second one works with CMUCL, but fails with ACL.
Both versions work for me in CMUCL. Is your version old?
dave