[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Questions about cond-expand
On Thu, Sep 6, 2012 at 1:46 PM, John Cowan <cowan@x> wrote:
> Alex Shinn scripsit:
>> > Hmm. I note that cond-expand, import, and include are all in the
>> > (scheme base) library, presumably because they are valid top-level
>> > program parts, whereas export is not, presumably because it isn't.
>> > Is that the Right Thing? If so, why?
>> export would not even make sense outside a library definition context.
> Granted. But cond-expand and import have to work even before
> any library is imported, so what sense does it make to put them in
> (scheme base)?
cond-expand and include(-ci) are in (scheme base) for import by libraries,
where no bindings are available by default. Only the program/repl
top-level has these bindings without needing to import them.
Naturally only the library declaration form of cond-expand can
expand into import and other library declarations.
import is in (scheme base) so you have some way to get to it
if you hose your repl by binding it to something else, although
you'd need some roundabout tricks with eval to do this.
Personally I'd rather cond-expand and include(-ci) only be
in (scheme base) and require importing to use, but we don't
have grounds to revisit this.
And yes, the language in the upcoming draft is not as
clear as it could be, I'll review it.
Scheme-reports mailing list