[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Extensions and Scheme variable visibility
From: |
Zbigniew |
Subject: |
[Chicken-users] Extensions and Scheme variable visibility |
Date: |
Fri, 24 Jun 2005 10:40:17 -0500 |
Let's say I am writing an extension and I have some common code I want
available to all the .scm files in the extension, but not visible to
the user. Since these functions are internal, I similarly may not
want them visible to -every- .scm file in the extension. And it is
possible that other extensions will also want to use this common code,
without polluting the user's namespace.
For example, the SSAX and SXML code at ssax.sf.net is broken down into
many different scheme files, many of which use each other's code. And
there are some utility functions used by both, even though the
extensions are "separate". However, the user does not need to see
many of these functions.
As far as I can tell, I can keep them hidden by duplicating the object
code [ (include) the common file ], or just make it available to
everyone [ (require) it ]. But I cannot make this code available
selectively; and I can't (declare (hide ...)) the internal functions,
because they won't be visible to anyone then.
Basically, I want to confirm I cannot restrict the visibility of
things exported from an extension, or selectively import them. This
would require me to make things much less granular (i.e. combine .scm
files together) to avoid including too much duplicate code.
- [Chicken-users] Extensions and Scheme variable visibility,
Zbigniew <=