From: Moritz Heidkamp <mor...@twoticketsplease.de> Subject: Re: [Chicken-hackers] importing modules of not yet loaded extensions Date: Sun, 12 Dec 2010 02:08:49 +0100
> Felix <fe...@call-with-current-continuation.org> writes: >> Being able to import a module without requiring the loading of the >> libary is necessary to allow cross-compilation. Chicken separates this >> and I consider it a feature. > > Right, Christian pointed this out, too. I wonder though: Are modules > which use `require-extension' cross-compilable then at all? Or does the > compiler somehow prevent the actual loading from taking place, > effectively replacing them by just an `import'? If that is indeed the > case, why not make `import' behave like `require-extension' in the first > place? Or am I missing something obvious? > Well, actually, I lied. For normal cross-compilation setup, you have both the import-lib and the runtime-lib separately for each architecture, but if you do so manually, this becomes important. But the situation is generally that it may be the case that you want to compile a file, even if the runtime-part might possibly not work. Why should the compiler load a huge graphics library just to compile a module that happens to import its interface? I like the separation and I like the fact that it's under user control and not magically done behind the scenes (there is already too much magic going on in extension-loading). The compiler does for example avoid the loading of the runtime-part at runtime, if the extension has the `(import-only)' property. Horrible, but you need that for syntax-only extensions. cheers, felix _______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-hackers