[Top][All Lists]

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

Re: [Gcl-devel] eval-when 'defaults'

From: Paul F. Dietz
Subject: Re: [Gcl-devel] eval-when 'defaults'
Date: Wed, 07 Jul 2004 19:47:38 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040514

Camm Maguire wrote:

Greetings!  Paul, from my brief reading of the spec, it would appear
that the default behavior for top level forms in a file being
compiled would be as if they were surrounded by an (eval-when
(:compile-toplevel :load-toplevel :execute)...). Is this right?

No.  Ordinary forms at the top level of a file being compiled
aren't evaled at compile time, but rather are just minimally compiled,
saved away, and evaled when the object file is loaded.

See 3.2.3, paragraph 2, first sentence, and also case 6 in

What *does* happen is that if the form is a macro form, the macro
is expanded at compile time.  'DEF' macros typically expand into
something with the necessary eval-when to force things to be computed
at compile time.  See for more details of processing top level


reply via email to

[Prev in Thread] Current Thread [Next in Thread]