[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: issue COMPILED-FUNCTION-REQUIREMENTS, version 4



    Date: Thu, 16 Mar 89 13:42:07 EST
    From: Dan L. Pierson <pierson@mist.encore.com>

	Date: Thu, 16 Mar 89 12:31 EST
	From: Barry Margolin <barmar@FAFNIR.THINK.COM>
    
	Another thing I just thought of is something like:
    
	    (when (typep f '(and function (not compiled-function)))
	      (setq f (compile nil f)))
    
	This doesn't actually work because COMPILE isn't required to accept
	lexical closures (well, at least it doesn't accept them in Genera 7.2),
	but they satisfy the type specifier, but it would be nice if there were
	a standard set of primitives that would allow one to write something
	that does what the above tries to do.
    
    One of Kent's points in earlier discussion was that it should (read
    MUST) be safe to blindly apply to COMPILE to any symbol with a
    function definition.  I thought there was general agreement on this.
    If the lastest draft contradicts this then it needs to be fixed.

I don't know what it says.  However, I didn't apply COMPILE to a symbol,
I applied it to NIL and a function, which means that the anonymous,
interpreted function should be compiled.

Actually, now I'm also a bit confused.  Since we passed the
FUNCTION-TYPE proposal, is the second argument to COMPILE supposed to be
a lambda expression or a function?  Should I have said (compile nil
(source-code f)) ?

                                                barmar