From: Peter Seibel
Subject: Why is in-package a macro?
Date: 
Message-ID: <m3iszn2y49.fsf@localhost.localdomain>
If all it does (per the HyperSpec) is set *package*, couldn't that be
done via a function? Or is it someting about the other sentence in the
"Side Effects" section:

  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
·····@javamonkey.com

From: Erik Naggum
Subject: Re: Why is in-package a macro?
Date: 
Message-ID: <3244755452388177@naggum.no>
* 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.

-- 
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.
From: Peter Seibel
Subject: Re: Why is in-package a macro?
Date: 
Message-ID: <m37kg32k08.fsf@localhost.localdomain>
Erik Naggum <····@naggum.no> writes:

> * 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.

-Peter

-- 
Peter Seibel
·····@javamonkey.com
From: Erik Naggum
Subject: Re: Why is in-package a macro?
Date: 
Message-ID: <3244807365227499@naggum.no>
* Peter Seibel <·····@javamonkey.com>
| 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.

-- 
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.
From: Vassil Nikolov
Subject: Re: Why is in-package a macro?
Date: 
Message-ID: <ulm4hehwz.fsf@poboxes.com>
    On Mon, 28 Oct 2002 05:47:14 GMT, Peter Seibel <·····@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.

---Vassil.

-- 
For an M-person job assigned to an N-person team, only rarely M=N.
From: Peter Seibel
Subject: Re: Why is in-package a macro?
Date: 
Message-ID: <m33cqo2xy2.fsf@localhost.localdomain>
Vassil Nikolov <········@poboxes.com> writes:

>     On Mon, 28 Oct 2002 05:47:14 GMT, Peter Seibel <·····@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.

-Peter

-- 
Peter Seibel
·····@javamonkey.com