Re: ANSI question (load evaluation order)
- From: Pascal Bourguignon <pjb@xxxxxxxxxxxxxxxxx>
- Date: Fri, 29 Apr 2005 18:23:13 +0200
Nicolas Neuss <my.name@xxxxxxxxxxxxxxxxxxxxx> writes:
> Hello,
>
> should the following work or do I have to wrap the function definition in
> an (EVAL-WHEN (:LOAD-TOPLEVEL)...)?
>
> test.lisp:
>
> (in-package :cl-user)
>
> (defun test ()
> "Doc"
> nil)
>
> (assert (documentation 'test 'function))
>
>
> In REPL:
> (load (compile-file "test"))
>
> It works in CMUCL/SBCL, but not in ACL.
CLHS says clearly that:
defun is not required to perform any compile-time side effects. In
particular, defun does not make the function definition available at
compile time. An implementation may choose to store information about
the function for the purposes of compile-time error-checking (such as
checking the number of arguments on calls), or to enable the function
to be expanded inline.
--
__Pascal Bourguignon__ http://www.informatimago.com/
Grace personified,
I leap into the window.
I meant to do that.
.
- Follow-Ups:
- Re: ANSI question (load evaluation order)
- From: Nicolas Neuss
- Re: ANSI question (load evaluation order)
- References:
- ANSI question (load evaluation order)
- From: Nicolas Neuss
- ANSI question (load evaluation order)
- Prev by Date: Re: Lisp/Unix impedance [a programming challenge]
- Next by Date: Re: Comparing Lisp conditions to Java Exceptions
- Previous by thread: Re: ANSI question (load evaluation order)
- Next by thread: Re: ANSI question (load evaluation order)
- Index(es):
Relevant Pages
|