chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] importing modules of not yet loaded extensions


From: Felix
Subject: Re: [Chicken-hackers] importing modules of not yet loaded extensions
Date: Sat, 11 Dec 2010 22:33:23 +0100 (CET)

From: Moritz Heidkamp <address@hidden>
Subject: [Chicken-hackers] importing modules of not yet loaded extensions
Date: Sat, 11 Dec 2010 18:27:56 +0100

> Fellow Chickeneers,
> 
> when investigating the problem described in ticket #450, Christian and I
> had a discussion about whether it makes sense to be able to import
> modules for which the extension defining them has not yet been
> loaded. In the situation described in the ticket this was the case with
> the posix extension. This might suggest that it's just some core unit
> oddity but it does indeed work with modules defined in eggs, too. Just
> try to run csi -n and (import chicken-doc) or any other egg you happen
> to have installed and you'll notice that all necessary .import.so files
> will be loaded but, of course, no binding will be imported at all. Thus
> I figured it may make sense to make importing modules which aren't
> actually loaded signal an error or at least output a warning to catch
> problems like this early on. It may be that I am misunderstanding
> something about import's purpose. However, we could not really settle
> for a satisfying explanation or solution. Any comments?

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. Remember the mantra:

  If in doubt, use `require-extension'.


cheers,
felix



reply via email to

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