[plt-scheme] questions about require and complie
At Mon, 28 Jun 2004 23:38:52 -0400, "Psy-Kosh" wrote:
> > But,
> >
> > > > (define y (compile ziggy))
> > > > y
> > > write: cannot marshal constant that is embedded in compiled
> code:
> >
> > if a value has no printed form, it can't exist in compiled code
> that is
> > written to a file (or stdout).
>
> Okay, so what's actually in there then? a quoted reference to the
> actual procedure?
Yes.
We sometimes call this "3-D code", because the code contains constants
that you can't write down in text input.
> (I'm guessing with primatives, what it does is just stick the name
> there, or such?)
Yes: the compiled-code printer recognizes values from the `mzscheme'
module, and it replaces the value with a reference to `mzscheme'.
(Actually, it only does that for `#%kernel' exports, but most
`mzscheme' exports are from `#%kernel'.)
Matthew