If the in-package form is a top level form, this assignment also
occurs at compile time.
that means it has to be a macro? Just a guess--I'm hoping that when I
understand why it's a macro I'll have increased either my
understanding of macros or of Lisp history.
-Peter
--
Peter Seibel
pe...@javamonkey.com
It used to be an operator that the evaluator/loader/etc had to recognize
specially. It is better to let `eval-when´ be that operator and make
`in-package´ be a macro that expands to use it.
--
Erik Naggum, Oslo, Norway
Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.
> * Peter Seibel
> | Just a guess--I'm hoping that when I understand why it's a macro I'll
> | have increased either my understanding of macros or of Lisp history.
>
> It used to be an operator that the evaluator/loader/etc had to recognize
> specially. It is better to let `eval-when´ be that operator and make
> `in-package´ be a macro that expands to use it.
I suspected that it had something to do with 'eval-when'. Duh--if I
had thought to macroexpand '(in-package "FOO") I would have known it.
Now to go wrap my head around 'eval-when'. Thanks.
You may find that `eval-when´ is quite counter-intuitive until you have
built up your intutions correctly. This is a known hard issue because
the different times that things are evaluated in Common Lisp is amenable
to grave mistakes in one's understanding without debilitating effects on
one's ability to use the system well. In the absence of correctors, many
people have gone very wrong and believed very wrong things for very long
before they had to revise it drastically in order to fully understand
`eval-when´. Be prepared to be surprised, and it should be a lot easier.
[...]
PS> Now to go wrap my head around 'eval-when'.
http://www.eskimo.com/~van/lib/lisp/describe-eval-when.lisp
is something I wrote about four years ago to help me figure out what
happens in various EVAL-WHEN forms. It might be useful.
---Vassil.
--
For an M-person job assigned to an N-person team, only rarely M=N.
> On Mon, 28 Oct 2002 05:47:14 GMT, Peter Seibel <pe...@javamonkey.com> said:
>
> [...]
> PS> Now to go wrap my head around 'eval-when'.
>
> http://www.eskimo.com/~van/lib/lisp/describe-eval-when.lisp
> is something I wrote about four years ago to help me figure out what
> happens in various EVAL-WHEN forms. It might be useful.
Thanks. I'll check it out.