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: Alan Post
Subject: Re: [Chicken-hackers] importing modules of not yet loaded extensions
Date: Sat, 11 Dec 2010 10:41:41 -0700

On Sat, Dec 11, 2010 at 06:27:56PM +0100, Moritz Heidkamp wrote:
> 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?
> 

I want what I think is the opposite, which I asked about here:

  http://lists.nongnu.org/archive/html/chicken-users/2010-12/msg00094.html

Jorg gave me several fantastic answers to that problem.  I've
decided to mimic the utf8 egg, if I can get away with it, and rebind
existing symbols on import.

It would be nice, however, if I could bind to an interface without
loading the library, so the library could be loaded later.  This
would prevent me from having to import what amounts to a dummy
library, only to later import the correct one and rebind all of its
symbols.

Generally, however, it is a bit annoying that import is an
all-or-nothing thing, tightly binding sets of libraries together by
not being able to separate importing from loading.  Your e-mail here
notwithstanding.

-Alan
-- 
.i ko djuno fi le do sevzi



reply via email to

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