chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] loading libraries is polluting my toplevel namespace


From: Michele Simionato
Subject: [Chicken-users] loading libraries is polluting my toplevel namespace
Date: Sat, 18 Dec 2004 10:04:22 -0500

It seems that by default external definitions are always loaded at the toplevel.
For instance if I do

(let ()
  (require 'srfi-1)
  (print fold) 
  )

(print fold) ; is defined even here

'fold' is imported at the toplevel and not inside the let scope. The
same happens
with load and require-extension. 

It is something I don't like very much. Is there any workaround to keep my
toplevel clean? I think I asked something similar in the past; also,
it there any
way to access the list of the names defined in a library? Something like
(get-exported-names 'my-library).

BTW, since I am asking, suppose I have a source file with a
(declare (unit 'my-library)) declaration and that I compile it with csc -s;
then I do the same for the same source file without the declaration:
it seems I can import the resulting .so file in both cases without
problems, so what's the difference?

Thanks,

          Michele Simionato




reply via email to

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