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

Re: issue COMPILED-FUNCTION-REQUIREMENTS, version 4



I'll just reiterate something I said at one of the meetings.  One
portable use I can think of for the COMPILED-FUNCTION type is as a
declaration to allow compiler optimization.  If a function knows (or
requires) that a parameter is a compiled function it can declare that
and the implementation may be able to optimize the FUNCALL better.

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.

                                                barmar