This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: New environment/module patches
thi <ttn@mingle.glug.org> writes:
> (1) could you explain the usage difference between {exported, protected}
> and {exported, non-protected} symbols?
They have the same meaning as in other languages (java, eiffel, etc.):
* non-exported, non-protected symbols are only visible within the
current module ("private" in java and c++) -------
* protected symbols are only visible within the current
-------
package (package == collection of related modules, as in
java).
* exported symbols are visible to anyone .
-------
Yes, you're right. "protect" is still misleading because it
doesn't protect variables from being changed as the name suggests.
(export (sym immutable-location) ...) or
(protect (sym immutable-location ...) does this.
> (2) does it make sense to have {non-exported, protected} or
> {non-exported, non-protected} usage outside the module in question?
Umm no. As in the unix file system and in languages like java
symbols are a) private to the current module, b) private to all
modules of the current group or c) public.
Jost