On Apr 28, 2009, at 10:41 AM, Michele Simionato wrote:

On Tue, Apr 28, 2009 at 9:25 AM, Abdulaziz Ghuloum <[email protected]> wrote:
You already know that Ikarus simply ignores the "for" thingy you
have up there, so, your import is no different from writing
 (import (rnrs) (only (aps list-utils) distinct?))
Right?

Yes, but the point is that you are importing distinct? both at runtime
*and* expand time, you cannot import it a run-time only.

Define "import".  :-)

I think I get what you're saying and it's true.  An imported
identifier is visible and available at all "meta" levels in
Ikarus.  In PLT and Larceny, an imported identifier is visible
at all meta levels but is only available at the ones you specify.
In all R6RS systems, you cannot make an imported identifier
visible only in some levels but not others.  For example, the
following library is invalid in all R6RS systems:

(library (foo)
  (export)
  (import (for (only (rnrs) define) run)
          (for (only (rnrs) car) expand))
  (define car 12))


See, FOO is invoked only at expansion/compile time and not at
run time.

Yes, this is because of separate compilation and I have already
explained this point in futures episodes that you will see soon ;-)
But you cannot import a name at runtime and not at compile
time, can you?

You see, the act of importing happens at expansion time (when a
library header is processed which happens immediately before the
library is expanded).  Once a piece of code is expanded, there
is no more importing going on.  So, while I think I know what you
mean, I'm not 100% sure.  When you said "imported at run time",
I thought you really meant "invoked" or "instantiated" since
these are the things that usually happen at run time.  Now if you
really meant "imported" as in "made the imported identifier names
visible/available at one part of the code but not another", then
you probably need to be more specific in your explanation.  The
distinction between the two is very delicate and subtle, so, you
need to work harder.  :-)

Aziz,,,

Reply via email to