[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Conflict between simple-macros and other extensions?
From: |
Thomas Chust |
Subject: |
Re: [Chicken-users] Conflict between simple-macros and other extensions? |
Date: |
Tue, 04 Oct 2005 15:43:00 -0000 |
User-agent: |
Opera M2/8.02 (MacPPC, build 2148) |
Am 04.10.2005, 14:19 Uhr, schrieb Graham Fawcett
<address@hidden>:
[...]
You know, Felix -- it would be great to have a single, well-written,
side-by-side comparison of '(use require-extension require-module
import load ...) somewhere. I respect that there must be valid reasons
for having all of these directives. Though the application developer
in me cries out "just give me one directive that Does The Right Thing
in any context!", I'm willing to pat the AD-in-me on the head and
console him if there's a good rationale for maintaining this rather
large suite of inclusion/linkage directives.
[...]
Hello,
in most cases the "require-extension" also known as "use" directive is
just the "Do The Right Thing" directive that you want.
But to have a comparison, the constructs I know of are
syntax: require-extension, use
* automatically decide to load source, shared object or library
* automatically decide whether it isn't already loaded
* automatically decide whether to load at compile or runtime
procedure: require
* automatically decide to load source, shared object or library
* automatically decide whether it isn't already loaded
* always load at runtime
procedure: require-for-syntax
* automatically decide to load source, shared object or library
* automatically decide whether it isn't already loaded
* always load at compile-time (unless interpreted)
procedure: load
* always load source or shared object
* always load it, no check whether it's already present
* always load at runtime
load-library:
* always load library (internally or from shared object)
* always load it, no check whether it's already present
* always load at runtime
I hope I have put it as simply as possible while still being correct...
These are only the procedures that concern themselves with *loading* of
code, though. In addition there are at least two module systems available
for CHICKEN: The one that comes with the syntax-case egg and the one that
you were using, which comes with the simple-macros egg. These systems have
their own semantics to *import* code and to *separate namespaces*. I
cannot give a good overview over their usage, though, because I never
seriously used them so far.
cu,
Thomas