chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] units used by default


From: felix winkelmann
Subject: Re: [Chicken-hackers] units used by default
Date: Tue, 8 Sep 2009 13:24:01 +0200

On Mon, Sep 7, 2009 at 9:36 PM, John Cowan<address@hidden> wrote:
>
> BTW, there is a bug in "use": if there is no module to import,
> it throws an error rather than silently doing nothing,
> contrary to the documentation, which speaks of "perform[ing]
> and implicit import, *if necessary*".

The "if necessary" is intended to mean: "if not already imported" (in fact,
I believe that I possibly meant "loaded", which is incorrect in this context).
I will rephrase that passage in the manual. "use" (which is "require-extension")
always does an import. Any sort of automatism in the act of importing appears
to be dangerous and confusing.

>
> Fixing this would (among other things) allow non-modularized files of
> plain R5RS code to be loaded by "use".

Note that you can always do so with "load" or "require"/"require-library".
"require-extension"/"use" is intended to load extensions, which a) should
be modules anyway, and b) have a special status in that they are located
from the extension repository and not the current directory, which would be
very problematic as one could break a program or script just by placing
a particularly named file in the cwd.


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]